Xml.XMLDoc.TXMLNode.HostNode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property HostNode: TXMLNode read FHostNode write FHostNode;

C++

__property TXMLNode* HostNode = {read=FHostNode, write=FHostNode};

Properties

Type Visibility Source Unit Parent
property protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNode

Description

Indicates the main object for the node to which this node corresponds when it represents a specialized view.

If this node represents a hosted node, HostNode is the main node for which this node represents a subset or specialized view. For example, if this node represents a set of repeating child elements, HostNode is the node that uses this node to represent its repeating child elements.

For example, consider the following XML fragment:

<students> <student name="John Smith"> <grade>incomplete</grade> </student> <student name="Jane Doe"> <grade>B+</grade> </student> <auditor name="Bill Jones"></auditor> <auditor name="Susan Brown"></auditor> </students>

The <students> node spawns two hosted nodes to represent the collections of repeating child nodes: one for all of the child nodes of type <student>, and one for all of the child nodes of type <auditor>. If this node represents one of those hosted nodes, then HostNode is the <students> node to which this node belongs. The host node lists this node in its HostedNodes property.

Applications can't use this protected property to access the host node that created this node. Instead, they use the HostNode property of the IXMLNode interface for this node.

See Also