XmlNodeReader.IsDefault 属性
定义
获取一个值,该值指示当前节点是否是从文档类型定义 (DTD) 或架构中定义的默认值生成的属性。Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the document type definition (DTD) or schema.
public:
virtual property bool IsDefault { bool get(); };
public override bool IsDefault { get; }
member this.IsDefault : bool
Public Overrides ReadOnly Property IsDefault As Boolean
属性值
如果当前节点是其值从 DTD 或架构中定义的默认值生成的属性,则为 true;如果属性值为显式设置的,则为 false。true if the current node is an attribute whose value was generated from the default value defined in the DTD or schema; false if the attribute value was explicitly set.
注解
备注
在 .NET Framework 2.0 中,建议的做法是 XmlReader 使用 XmlReaderSettings 类和方法创建实例 Create 。In the .NET Framework 2.0, the recommended practice is to create XmlReader instances using the XmlReaderSettings class and the Create method. 这允许您充分利用 .NET Framework 中引入的所有新功能。This allows you to take full advantage of all the new features introduced in the .NET Framework. 有关详细信息,请参阅 "参考" 页中的 "备注" 部分 XmlReader 。For more information, see the Remarks section in the XmlReader reference page.
此属性仅适用于属性节点。This property applies to attribute nodes only. 如果读取器未定位在属性节点上,则此属性返回 false 。If the reader is not positioned on an attribute node, this property returns false.