I am trying to parse an XML file using TXMLDocument and Delphi XE2. I am new to XML with Delphi and having much trouble accessing the attribute values from this file:
I have no trouble reaching the first level <Cube> and can return an IXMLNode instance but I cannot get to anything below that ie. second and third level child nodes (both <Cube>) and their attribute values.
Basically I'm doing this, for example, to get the "time" attribute value from the second level <Cube> ...
StartingItemNode := XMLDocument.DocumentElemen
aNode := StartingItemNode;
sDATE := aNode.ChildNodes['Cube'].A
... line 1 is fine but sDATE in line 3 is always null.
Please could anyone tell me where this is going wrong ?
thanks and best wishes