0

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?

vincent
  • 1,243
  • 4
  • 15
  • 29

1 Answers1

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