1 Reply Latest reply on Jun 4, 2014 7:37 AM by Dirk Becker

    evaluateXPathExpression not fetching

    Arivusudar Level 1

      I have a Indesign XML file, like below

       

      <code>

      <component xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" version="2.0" type="bookChapter" xml:lang="en" xml:id="w9781118832523c3" xmlns="http://www.wiley.com/namespaces/wiley" xmlns:wiley="http://www.wiley.com/namespaces/wiley/wiley" xmlns:cms="http://cms.wiley.com" xmlns:dctm="http://www.documentum.com"><header><contentMeta><titleGroup><title type="main" Ranid="1955618846">Sample title</title></titleGroup></contentMeta></header><body sectionsNumbered="yes" xml:id="c3-body-0001"><section type="opening" xml:id="c3-sec-0001" numbered="no"><p>Sample text</p>
</section><section xml:id="c3-sec-0002">....</code>

       

      and my script is here to fetch section .., but its not fetching..section element..its showing only 0.

       

      <code>

      var myRoot=aDoc.xmlElements.firstItem();

       

       

      var mySection=myRoot.evaluateXPathExpression("//section/title");

      alert(mySection.length);

      exit(0);</code>