ノードの値を取得または設定します。
Public Overridable Property Value As String
[C#]
public virtual string Value {get; set;}
[C++]
public: __property virtual String* get_Value();public: __property virtual void set_Value(String*);
[JScript]
public function get Value() : String;public function set Value(String);
プロパティ値
返される値は、ノードの NodeType によって異なります。
Type | 値 |
---|---|
Attribute | 属性の値。 |
CDATASection | CDATA セクションの内容。 |
Comment | コメントの内容。 |
Document | null 参照 (Visual Basic では Nothing). |
DocumentFragment | null 参照 (Nothing). |
DocumentType | null 参照 (Nothing). |
Element | null 参照 (Nothing) 。 XmlElement.InnerText プロパティまたは XmlElement.InnerXml プロパティを使用すると、要素ノードの値にアクセスできます。 |
Entity | null 参照 (Nothing). |
EntityReference | null 参照 (Nothing). |
Notation | null 参照 (Nothing). |
ProcessingInstruction | ターゲットを含まない全体の内容。 |
Text | テキスト ノードの内容。 |
SignificantWhitespace | 空白文字。空白は、1 つ以上の空白文字、キャリッジ リターン、ライン フィード、またはタブによって構成できます。 |
Whitespace | 空白文字。空白は、1 つ以上の空白文字、キャリッジ リターン、ライン フィード、またはタブによって構成できます。 |
XmlDeclaration | 宣言の内容。つまり <?xml と ?> の間のすべて。 |
例外
例外の種類 | 条件 |
---|---|
ArgumentException | 読み取り専用のノードの値を設定します。 |
InvalidOperationException | 値がないと想定されているノード (Element ノードなど) の値を設定します。 |
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET