This topic has not yet been rated - Rate this topic

XPathNavigator.IsEmptyElement Property

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

[Visual Basic]
Public MustOverride ReadOnly Property IsEmptyElement As Boolean
[C#]
public abstract bool IsEmptyElement {get;}
[C++]
public: __property virtual bool get_IsEmptyElement() = 0;
[JScript]
public abstract function get IsEmptyElement() : Boolean;

Property Value

true if the current node is an element (NodeType equals XPathNodeType.Element) that ends with "/>"; otherwise, false.

Remarks

This property enables you to determine the difference between the following:

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

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

<item num="123">test</item> (IsEmptyElement is false).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

XPathNavigator Class | XPathNavigator Members | System.Xml.XPath Namespace

Did you find this helpful?
(1500 characters remaining)