Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Accessing XML data


Not applicable
Hi, hope somebody can help me with this:

I have xml as follows:

this is line 1
this is line 2

I want to acces this data from a script on a button. if it is not a repeating tag i access it like this

However, how do i access all the repeating tags one at a time in a for loop?
5 Replies


Not applicable
You can take a look at this post to see if this is something that you are looking for?


Not applicable
If the you already have this in your datasets (i.e. repeating nodes), then you could access this by using"line[1]").value


Not applicable
Thanks David,<br />next challenge i have with the same problem is determining how many lines there are - any ideas on this <br /><br />xfa.record.node.length tells me all the lines in the xml file and not just for the repeating tag i am interested in<br /><br />xfa.record.nodes.namedItem('line") gives me first one, but I can't get the next one<br /><br />xfa.record.nodes.item(var).value - gives me the contents of the lines but not the tag names<br /><br />all I really want to do is get each of the <line> data into an array so I can work with them


Not applicable
Hi Chris,

To get all the line nodes you can use the resolveNodes method instead, which returns a collection of nodes instead of a single node returned by resolveNode

var oLineNodes ="line[*]");

oLineNodes.length will give you the number of elements in the collection and then use item to access each one using a for loop


for(var i=0; i<oLineNodes.length; i++)


??? = oLineNodes.item(i).value;


where ??? is something you want to do with the value.