Edit

Bagikan melalui


XPathNavigator.UnderlyingObject Property

Definition

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

public:
 virtual property System::Object ^ UnderlyingObject { System::Object ^ get(); };
public virtual object? UnderlyingObject { get; }
public virtual object UnderlyingObject { get; }
member this.UnderlyingObject : obj
Public Overridable ReadOnly Property UnderlyingObject As Object

Property Value

The default is null.

Remarks

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.

Note

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

Applies to