Export (0) Print
Expand All

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, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft