Issue Parsing XML in live code, Insights appreciated.
Posted: Tue Jul 10, 2012 4:49 pm
I am having an issue accessing all the date values in the following xml
<entries>
<entry>
<date>2011-08-18</date>
<name></name>
</entry>
<entry>
<date>2011-08-19</date>
<name></name>
</entry>
<entry>
<date>2011-08-20</date>
<name></name>
</entry>
</entries>
With the following code I am accessing just one of the date nodes but am having trouble getting the node contents for each date node.
Appreciate any insight or help you can give me.
Thanks
<entries>
<entry>
<date>2011-08-18</date>
<name></name>
</entry>
<entry>
<date>2011-08-19</date>
<name></name>
</entry>
<entry>
<date>2011-08-20</date>
<name></name>
</entry>
</entries>
With the following code I am accessing just one of the date nodes but am having trouble getting the node contents for each date node.
Code: Select all
local tPosts
put revXMLChildNames(pTree, "entries/entry", return, "date", true) into tPosts
local tListOfDates
repeat for each line tDate in tPosts
put revXMLNodeContents(pTree, "entries/entry/" & tDate) & return after tListOfDates
end repeat
Thanks