XmlParserContext クラス
アセンブリ: System.Xml (system.xml.dll 内)


XML フラグメントを読み取る XmlReader オブジェクトを作成する例を次に示します。
Dim xmlFrag As String = "<item rk:ID='abc-23'>hammer</item> " & _ "<item rk:ID='r2-435'>paint</item>" & _ "<item rk:ID='abc-39'>saw</item>" ' Create the XmlNamespaceManager. Dim nt As New NameTable() Dim nsmgr As New XmlNamespaceManager(nt) nsmgr.AddNamespace("rk", "urn:store-items") ' Create the XmlParserContext. Dim context As New XmlParserContext(Nothing, nsmgr, Nothing, XmlSpace.None) ' Create the reader. Dim settings As New XmlReaderSettings() settings.ConformanceLevel = ConformanceLevel.Fragment Dim reader As XmlReader = XmlReader.Create(New StringReader(xmlFrag), settings, context)
string xmlFrag ="<item rk:ID='abc-23'>hammer</item> " + "<item rk:ID='r2-435'>paint</item>" + "<item rk:ID='abc-39'>saw</item>"; // Create the XmlNamespaceManager. NameTable nt = new NameTable(); XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt); nsmgr.AddNamespace("rk", "urn:store-items"); // Create the XmlParserContext. XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); // Create the reader. XmlReaderSettings settings = new XmlReaderSettings(); settings.ConformanceLevel = ConformanceLevel.Fragment; XmlReader reader = XmlReader.Create(new StringReader(xmlFrag), settings, context);

System.Xml.XmlParserContext


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からXmlParserContext クラスを検索する場合は、下記のリンクをクリックしてください。

- XmlParserContext クラスのページへのリンク