Mono Class Library: System.Xml.XmlTextReader Overview | Members

System.Xml.XmlTextReader.IsEmptyElement Property

Gets a value indicating whether the current node is an empty element (for example, <MyElement />). [Edit]

public override bool IsEmptyElement { get; }

Value

A bool where true indicates the current node is an element (XmlTextReader.NodeType equals XmlNodeType.Element) that ends with "/>"; otherwise, false. [Edit]

Remarks

This property is read-only.

A XmlNodeType.EndElement node is not generated for empty elements.

Note:

This property determines the difference between the following:

<item bar="123"/> (IsEmptyElement is true).

<item bar="123"> (IsEmptyElement is false).

This property overrides XmlReader.IsEmptyElement.

[Edit]

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0