2 Replies Latest reply: Dec 14, 2012 8:52 AM by stan_rsm RSS

    How to find the child nodes from XMLDoc where --> var XMLDoc = subform.datanode.saveXML("pretty");

    stan_rsm Community Member

      Hi all,

       

      I am very new to ADEP designer.  Please help me out with this issue.

       

      Assume that the Subform.datanode.saveXML() returns an XML as below.

      <test>

           <paper1>English</paper1>

           <paper2>Science</paper2>

           <paper3>History</paper3>

      <test>

       

      In the script:

       

      var XMLDoc = subform.datanode.saveXML("pretty");

      for(nodeCount=0; nodeCount< XMLDoc.nodes.length;nodeCount++)

       

      returns an error as "Error:null is not an object" .  But i was able to access the values by directly specifying "XMLDoc.paper1[0].toString();"

       

      Can any one please suggest a way to find out the child node count in this context?