daralim
daralim

Reputation: 183

How to parse XML file via InDesign script

The title speaks for itself. I tried to look for a parser in JavaScript but they don't seem to work in InDesign. Does somebody know how to do it?

Upvotes: 0

Views: 1352

Answers (1)

Loic
Loic

Reputation: 2193

var xmlFile = File( "/some/xml/file/url" );
xmlFile.open("r");
var myXMLObject = XML ( xmlFile.read() );
xmlFile.close();
alert( myXMLObject.name() );

Upvotes: 2

Related Questions