XmlParserContext Class
.NET Framework 3.0
Provides all the context information required by the XmlReader to parse an XML fragment.
Namespace: System.Xml
Assembly: System.Xml (in system.xml.dll)
Assembly: System.Xml (in system.xml.dll)
The following example creates an XmlReader object that reads an XML fragment.
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)
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: