I'm making an extension for indesign in flex. I need to convert xmlElements to xml. When you export a file as xml, you get a nicely structured xml file. But how can i easily convert exmlElements to use in my code?
Asked
Active
Viewed 144 times
0
-
And the question of the hour is. What have you tried? – The_asMan Jun 02 '12 at 04:30
1 Answers
0
You can call exportFile from a xmlElement. Once that said, you should be able to get a nicely xml structure.
Here is a simple test :
app.activeDocument.xmlElements[0].xmlElements[-1].exportFile ( ExportFormat.XML , File ( Folder.desktop + "/test.xml" ) );
Then the output gives me :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Article>dssds</Article>
Loic

Loic Aigon
- 506
- 3
- 1