I'm putting together a script for InDesign using javascript, and have a settings xml file from which I'd like to pull out a value of a particular node.
I've successfully read in the XML file
var xml = new XML(file.read());
and can easily pull attribute values / node lengths etc, however I'd like to pull the text inside a particular node.
<article>
<title>This is the title</title>
</article>
I've tried xml.article[0].title
but this returns an XML object not the vale. I've tried nodeValue
to no success. How do I obtain the actual text?