This documentation is archived and is not being maintained.
XmlParserContext Class
Visual Studio 2008
Provides all the context information required by the XmlReader to parse an XML fragment.
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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: