Can someone help me with getting the "Test Project n" string values from each of these items in <a n="Formatted Name" v="Test Project 1"/>
These do not seem to appear to be attributes. What are they and how do I get the text i need?
<?xml version="1.0" encoding="utf-8" ?>
<items>
<item Id="814135481" Rank="1"><a n="Formatted Name" v="Test Project 1"/></item>
<item Id="814135882" Rank="2"><a n="Formatted Name" v="Test Project 2"/></item>
<item Id="814135908" Rank="3"><a n="Formatted Name" v="Test Project 3"/></item>
</items>
RootNode := XMLDoc.DocumentElement;
for I := 0 to RootNode.ChildNodes.Count-1 do
begin
//
end;
RootNode.ChildNodes[I].AttributeNodes[n]
will give me the list of attributes on the item, but I dont know how to extract these values
<a n="Formatted Name" v="Test Project 1"/>
XML for understanding ANSWER:
<?xml version="1.0" encoding="utf-8" ?>
<items>
<item Id="814135481" Rank="1">
<a n="Formatted Name" v="Test Project 1"/>
</item>
<item Id="814135882" Rank="2">
<a n="Formatted Name" v="Test Project 2"/>
</item>
<item Id="814135908" Rank="3">
<a n="Formatted Name" v="Test Project 3"/>
</item>
</items>