1 Reply Latest reply on Mar 23, 2014 12:42 AM by Kasyan Servetsky

    How to convert "xmlElement Object" to "xml Object" ?




      I think I'm missing something.


      Is there a way to convert (not export) my xmlElements to an XML object ?


      My content is now well tagged by script but I want to manipulate the result (adding some meta contents, change order, nested some tags inside others...). I've understand that the logic way is to export and working with xslt. But as I'm a little bit stubborn, I would like to try it with extendscript. So the idea is to have a xml (obect) copy of my xmlElements (I don't want to change my indesign content, just my xml object before exporting).


      Does it make sense for anybody?




      ** Edit ** : to be straight, I'm looking for a way to do :


      var myXml = new XML(app.activeDocument.xmlElements[0].toString); // but the toString method doesn't exist for xmlElement Objects