My company is changing processes away from an xml based workflow, so we have hundreds of InDesign files that need to have the xml removed. I'm writing a script that will do it automatically, but I'm having problems untagging all of the text. Most files have a structure like this:
My starting script here:
var myRoot = myDoc.xmlTags.name;
myDoc.xmlTags.itemByName(myRoot).name = "Root";
/*END REMOVE TAGS*/
gives me this result:
I need help untagging the text leftover in the 'Root' tag so that my final result is this:
@T-Stevens – we already had that solved here.
See the following:
Here the "long" version:
Hans Haesler at www.hilfdirselbst.ch once wrote the following snippet:
The root element might be left over now.
Gregor Fellenz did the following "hack" to get rid of it as well:
var tempRect = app.documents.rectangles.add(); tempRect.markup(app.documents.xmlElements); tempRect.remove();
Don't know, if that will work for you…
Also see the following thread in German about it:
Also the alternative solution with a script menu action by Hans Haesler:
Thanks, this does what I need it to. I thought I had looked through that post before I submitted my question, but I guess I didn't look closely enough and missed this snippet. I appreciate your help.