For instance, I have an xml like the one below:
<Root>
<Sites>
<Site ID="1">
<Projects>
<DownTown>
<Project>
<Funds/>
</Project>
<Project>
<Funds/>
</Project>
<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.
Views
Replies
Total Likes
Hi,
you can use a loop to determine all childs of a specific node like "Projects".
Views
Replies
Total Likes
Hi,
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
Hi,
you can use a loop to determine all childs of a specific node like "Projects".
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies