Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Accessing the child nodes of a tag in X ML

Avatar

Former Community Member
With the code given below we are able to get the number of parent tags and their values present in an XML.<br /><br />var xmlnode = xfa.resolveNode("$data.nodes.item(0)");<br />var p = xmlnode.nodes.length;<br />app.alert("xmlnode.nodes.length = "+p);<br /><br />for (i=0; i<p; i++)<br />{<br /> <br /> app.alert("Node name = "+xmlnode.nodes.item(i).name +", Node Value = "+xmlnode.nodes.item(i).value);<br />}<br /><br />But we are not able to access the child tags present in the parent tag.Please help us to get the number of child tags and to access their values.
0 Replies