XPathNavigator.IsEmptyElement Property

When overridden in a derived class, gets a value indicating whether the current node is an empty element without an end element tag.

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

public abstract bool IsEmptyElement { get; }

Property Value

Type: System.Boolean
true if the current node is an empty element; otherwise, false.

This property enables you to determine the difference between the following different elements.

Element

IsEmptyElement Value

<item num="123"/>

true

<item num="123">test</item>

false

<item num="123"></item>

false

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft