現在のノードが空の要素 (<MyElement/> など) かどうかを示す値を取得します。
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;
プロパティ値
現在のノードが "/>" で終わる要素 (NodeType が XPathNodeType.Element に等しい) の場合は true 。それ以外の場合は false 。
解説
このプロパティを使用すると、次の 2 つの違いを確認できます。
<item num="123"/>
(IsEmptyElement が true)。
<item num="123"></item>
(IsEmptyElement が false)。
<item num="123">test</item>
(IsEmptyElement が false)。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
XPathNavigator クラス | XPathNavigator メンバ | System.Xml.XPath 名前空間