XmlValidatingReader.NameTable 属性
定义
获取与此实现关联的 XmlNameTable。Gets the XmlNameTable associated with this implementation.
public:
virtual property System::Xml::XmlNameTable ^ NameTable { System::Xml::XmlNameTable ^ get(); };
public override System.Xml.XmlNameTable NameTable { get; }
member this.NameTable : System.Xml.XmlNameTable
Public Overrides ReadOnly Property NameTable As XmlNameTable
属性值
XmlNameTable,它使你能够获取节点内字符串的原子化版本。XmlNameTable that enables you to get the atomized version of a string within the node.
注解
备注
XmlValidatingReader类在 .NET Framework 2.0 中已过时。The XmlValidatingReader class is obsolete in .NET Framework 2.0. 您可以 XmlReader 使用 XmlReaderSettings 类和方法创建验证实例 Create 。You can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. 有关详细信息,请参阅 XmlReader 引用页的“备注”部分。For more information, see the Remarks section of the XmlReader reference page.
从返回的所有节点和属性名称 XmlValidatingReader 都使用进行原子化 NameTable 。All node and attribute names returned from XmlValidatingReader are atomized by using the NameTable. 如果多次返回相同的名称 (例如 Customer) ,则 String 将为该名称返回相同的对象。When the same name is returned multiple times (for example, Customer), the same String object will be returned for that name. 这样一来,就可以编写有效的代码,对这些字符串进行对象比较,而不是对开销较高的字符串进行比较。This makes it possible for you to write efficient code that does object comparisons on these strings instead of expensive string comparisons.