XPathNavigator.UnderlyingObject Property

Used by XPathNavigator implementations which provide a "virtualized" XML view over a store, to provide access to underlying objects.

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

public virtual Object UnderlyingObject { get; }

Property Value

Type: System.Object
The default is null.

The UnderlyingObject property can be used by XPathNavigator implementations which provide a "virtualized" XML view over a store, to provide access to underlying objects. For example, if an XPathNavigator object is used to provide a virtual XML view over a Common Language Runtime (CLR) object graph, you may wish to perform XPath queries using the Select method and then access the CLR objects underlying the selected nodes. The UnderlyingObject property would expose these underlying objects.

In many cases, this value will be null, and the object returned by the UnderlyingObject property will always be implementation specific.

The UnderlyingObject property should preserve object identity and should only be used to return objects that have a one-to-one correspondence to their respective overlaid items. A user should always get the same object on successive visits to the same node using the same XPathNavigator object or a cloned one.

NoteNote

The UnderlyingObject property of an XPathNavigator object created by an XmlDocument object returns the corresponding XmlNode.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft