0 Replies Latest reply on Aug 18, 2012 5:54 AM by Lucky Siva

    XML: print parents of an element from root

    Lucky Siva Level 1

      Hi Everybody,

       

      Is there any way in Indesign Javascript to literally print the parents or ancestors (xpath) of an element from the root element of an xml file. The below screenshot is the output from Perl script. And the code of Perl script is:

       

      "my @elt = $twig->get_xpath('//index/index-list');

       

      for(my $i=0; $i<scalar(@elt); $i++){

              print $elt[$i]->xpath, "\n";

      }"

       

      output.png

       

      Can we get the same kind of output using Indesign Javascript?