This content has been marked as final. Show 5 replies
It seems that you can't remove unused xml elements (as for swatches for example) from the UI so, it might be possible through scripting.
I am afraid that you can't automate this kind of things.
I don't find this to be true--in CS4, anyway. When I move a page containing XML content into a new document, only that content and its parents appear in the new document. The XML elements preceding or following the copied XML elements are not copied over. The parent elements have to be copied over because they're part of the structure on those pages. Does that make sense? Are you seeing XML content other than the parent elements?
[Edit: Just verified that this is also true in CS3.]
Thanks for your response too. By the way, I downloaded and used your ExtractPages_test.jsx that you posted back in June and it works great.
Now I'm hoping to create a script to extract just the XML tags from a given page, but I'm not sure if it can be automated.
I ain't seen any way to export your doc to xml by scripting. I don't say it's not possible, it's just that from my side I couldn't.
I couldn't get the exportFile(File("/x/toto.xml") command working.
The other approach could have been to invoke the export to xml menu action but although the command works, it's just opening the xml export window and you have not really gone far.
Maybe Olav and other scripting masters will have the key but I havn't :-(