Share via


XmlNameTable Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Table of atomized string objects.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class XmlNameTable
public class XmlNameTable
public ref class XmlNameTable
type XmlNameTable =  class end
public class XmlNameTable

The XmlNameTable type exposes the following members.

Constructors

  Name Description
Public method XmlNameTable Initializes a new instance of the XmlNameTable class.

Top

Methods

  Name Description
Public method Add When overridden in a derived class, atomizes the specified string and adds it to the XmlNameTable.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Get When overridden in a derived class, gets the atomized string containing the same value as the specified string.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Several classes, such as XmlReader, use 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.

Thread Safety

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

See Also

Reference

System.Xml Namespace

NameTable