Export (0) Print
Expand All

XmlParserContext Class

Provides all the context information required by the XmlReader to parse an XML fragment.

System.Object
  System.Xml.XmlParserContext

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

'Declaration
Public Class XmlParserContext

The XmlParserContext type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlParserContext(XmlNameTable, XmlNamespaceManager, String, XmlSpace)Initializes a new instance of the XmlParserContext class with the specified XmlNameTable, XmlNamespaceManager, xml:lang, and xml:space values.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlParserContext(XmlNameTable, XmlNamespaceManager, String, XmlSpace, Encoding)Initializes a new instance of the XmlParserContext class with the specified XmlNameTable, XmlNamespaceManager, xml:lang, xml:space, and encoding.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlParserContext(XmlNameTable, XmlNamespaceManager, String, String, String, String, String, String, XmlSpace)Initializes a new instance of the XmlParserContext class with the specified XmlNameTable, XmlNamespaceManager, base URI, xml:lang, xml:space, and document type values.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360XmlParserContext(XmlNameTable, XmlNamespaceManager, String, String, String, String, String, String, XmlSpace, Encoding)Initializes a new instance of the XmlParserContext class with the specified XmlNameTable, XmlNamespaceManager, base URI, xml:lang, xml:space, encoding, and document type values.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360BaseURIGets or sets the base URI.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360DocTypeNameGets or sets the name of the document type declaration.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360EncodingGets or sets the encoding type.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360InternalSubsetGets or sets the internal DTD subset.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360NamespaceManagerGets or sets the XmlNamespaceManager.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360NameTableGets the XmlNameTable used to atomize strings. For more information on atomized strings, see XmlNameTable.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360PublicIdGets or sets the public identifier.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360SystemIdGets or sets the system identifier.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlLangGets or sets the current xml:lang scope.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360XmlSpaceGets or sets the current xml:space scope.
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360Equals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360FinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360ToStringReturns a string that represents the current object. (Inherited from Object.)
Top


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
Using reader As XmlReader = XmlReader.Create(New StringReader(xmlFrag), settings, context)

End Using


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft