RAD Studio VCL Reference
|
Represents the values of this node's child nodes.
property ChildValues [const IndexOrName: OleVariant]: OleVariant;
__property OleVariant ChildValues[OleVariant const IndexOrName];
Use ChildValues to access the values of this node's children.
IndexOrName identifies the desired child node either by its interface, or by a string that is the local name of the child node. If IndexOrName does not identify a child of this node, trying to get or set ChildValues causes an exception.
The value of a child node depends on the type of the child node, as indicated in the following table:
Value | |
ntElement |
If the element contains only text, this is that text value. Otherwise, it is the Value of the first child node. |
ntText |
The text |
ntCData |
The content of the CDATA section. |
ntProcessingInstr |
The content of the processing instruction except for the target. |
ntComment |
The value (text) of the comment. |
If the child node is any other node type, reading or setting ChildValues causes an exception. |
|
Edit1.Text := XMLDocument1.DocumentElement.ChildValues['Name'];
can also be written
Edit1.Text := XMLDocument1.DocumentElement['Name'];
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|