Xml.XMLDoc.TXMLNode.HostedNodes

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property HostedNodes: TXMLNodeArray read GetHostedNodes;

C++

__property TXMLNodeArray HostedNodes = {read=GetHostedNodes};

Properties

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

Description

Lists the nodes that share this node's lists of child and attribute nodes.

TXMLNode uses HostedNodes to keep track of the nodes it uses to represent this same node, restricted to a specialized purpose. For example, any node that represents a subset of this node's child nodes that are all of the same type is a hosted node.

Each object in the HostedNodes list is a representation of a particular aspect of this node. Each hosted node acts as a sibling to this TXMLNode object but does not represent a separate element in the XML document. Rather, it represents a different view of this element.

For example, consider the following XML fragment:

<students> <fulltime student>Joe Smith</fulltime student> <fulltime student>Jane Doe</fulltime student> <auditor>Bill Jones</auditor> </students>

The TXMLNode that represents students would define two hosted nodes for collections of repeating child elements, one for the fulltime students, and one for the auditors. The two collections share the same underlying DOM node as students, but each represents only those child elements of a particular type.

See Also