XmlNameTable Class

XmlNameTable Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Table of atomized string objects.

System::Object
  System.Xml::XmlNameTable
    System.Xml::NameTable

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

No code example is currently available or this language may not be supported.

The XmlNameTable type exposes the following members.

  NameDescription
Protected methodXmlNameTableInitializes a new instance of the XmlNameTable class.
Top

  NameDescription
Public methodAdd(String)When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable.
Public methodAdd(array<Char>, Int32, Int32)When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGet(String)When overridden in a derived class, gets the atomized string containing the same value as the specified string.
Public methodGet(array<Char>, Int32, Int32)When overridden in a derived class, gets the atomized string containing the same characters as the specified range of characters in the given array.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The XmlReader uses the XmlNameTable class internally to store attribute and element names. When an element or attribute name occurs multiple times in an XML document, it is stored only once in the XmlNameTable.

The names are stored as common language runtime (CLR) object types. This enables you to do object comparisons on these strings rather than a more expensive string comparison. These string objects are referred to as atomizedstrings.

XmlNameTable is implemented in the NameTable class.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

Show:
© 2017 Microsoft