Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Value Property

XmlReader.Value Property

When overridden in a derived class, gets the text value of the current node.

[Visual Basic]
Public MustOverride ReadOnly Property Value As String
[C#]
public abstract string Value {get;}
[C++]
public: __property virtual String* get_Value() = 0;
[JScript]
public abstract function get Value() : String;

Property Value

The value returned depends on the NodeType of the node. The following table lists node types that have a value to return. All other node types return String.Empty.

Node Type Value
Attribute The value of the attribute.
CDATA The content of the CDATA section.
Comment The content of the comment.
DocumentType The internal subset.
ProcessingInstruction The entire content, excluding the target.
SignificantWhitespace The white space between markup in a mixed content model.
Text The content of the text node.
Whitespace The white space between markup.
XmlDeclaration The content of the declaration.

Example

See Value (in the XmlTextReader class) for a sample using this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace

Show:
© 2015 Microsoft