3 Replies Latest reply on Aug 12, 2013 1:53 AM by Vamitul

    Help needed on listing out all tag names using XML Rules in ExtendScript(InDesign)


      Given a document with elements already in place, I am looking for a snippet of code to walk down the XML tree only two levels

      deep to printout the names of each of the tags (not attributes).  I am just using javascript in extendscipt to accomplish this.  Ultimately,

      I want to provide this list in a checkbox dialog and use those checked items to develop a TOC.  This latter part, I have in place.

      It is just the pushing of the tag element names into an array that seems to be cumbersome for me at this point.


      Any shortcut snippets out there that someone can provide?


      A shorter version of this request....Is there anyway to just list out all element.markupTag.name of an XML tree, not knowing the xpath naming?

      Using "//*" obviously is not working....