Breyta

Deila með


XPathNavigator.TypedValue Property

Definition

Gets the current node as a boxed object of the most appropriate .NET type.

public:
 virtual property System::Object ^ TypedValue { System::Object ^ get(); };
public override object TypedValue { get; }
member this.TypedValue : obj
Public Overrides ReadOnly Property TypedValue As Object

Property Value

The current node as a boxed object of the most appropriate .NET type.

Remarks

For attributes and elements with atomic simple type or simple text content, the TypedValue property returns a boxed Object of the most appropriate .NET Type. If the element or attribute's content is a list type, the TypedValue property returns an array of objects of the most appropriate .NET Type.

The following table describes the TypedValue returned by each XPathNodeType.

XPathNodeType TypedValue Returned
Root Returns a String object containing all Text node descendants of the document, concatenated and separated by white space. If the document does not have any Text node children, String.Empty is returned.
Element

(typed or simple content)
Returns an Object that represents the typed value of the Element.

If the Element is defined as an XML Schema list data type, then the node value is exposed as an array of objects. Each Object in the array contains the typed value of a child of the element.
Element

(untyped, mixed, or complex content)
Returns a String object containing all Text node descendants of the Element (including string representations of typed values), concatenated and separated by white space. If the Element does not have any Text node children, String.Empty is returned.
Attribute

(typed or simple content)
Returns an Object that represents the typed value of the Attribute. The Object is boxed as a .NET Type value.

If the Attribute is defined as an XML Schema list data type, the node value is exposed as an array of objects. Each Object in the array contains the typed value of a child of the Attribute.
Text A String object containing the text.
Comment A String object containing the content of the comments, excluding the surrounding <!-- and -->.
ProcessingInstruction A String object containing the content of the processing instruction, excluding the target and surrounding <? and ?>.
Namespace A String object containing the namespace name.
Whitespace A String object containing the text of the node.
SignificantWhitespace A String object containing the text of the node.

Applies to