3 Replies Latest reply on Feb 22, 2012 4:16 AM by கற்பனை (Imagine)

    How to Get a List of All XMLElement Tags

    mlavie Level 1

      (CS5, Win7, 64Bit)

       

      I need a list of all the unique XML Tag names in a given document (just like the Tags Panel in InDesign itself).

       

      I could not find any "normal" way (i.e., builtin-in property or method) to get at the information. Instead, I found that I had to recurse through the entire XMLElement tree, starting with the Root Element. For a large document, this can take close to a quarter of an hour, and sometimes I have to do this for an InDesgin Book containing over ten enormous INDD files.

       

      There HAS to be a better way, right?

       

      Would it be better were I to recurse through all PageItems in the document and then recurse through each PageItem's XMLElement tree? I assume that wouldn't make a big difference wither way.

       

      I'm open to suggestions...

       

       

      TIA,

      mlavie