RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNode.HostedNodes Property

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

Pascal
property HostedNodes: TXMLNodeArray;
C++
__property TXMLNodeArray HostedNodes;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!