Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
For instance, I have an xml like the one below:
<Root>
<Sites>
<Site ID="1">
<Projects>
<DownTown>
<Project>
<Funds/>
</Project>
</DownTown>
</Projects>
</Site>
</Sites>
</Root>
How do you check if the funds element have a child element?
Thanks for your help.
Solved! Go to Solution.
Hi,
you can use a loop to determine all childs of a specific node like "Projects".
View solution in original post
Assuming this is used as a data file and assuming you have resolved to the Funds node you should be able to just call Funds.nodes.length.
e.g.
var Funds = xfa.datasets.data.resolveNode ("pathToFundsNode");
if ( Funds.nodes.length > 0)
{
// Funds has children nodes;
}
Hope this helps
Malcolm
Views
Likes
Replies