i'm trying parse a user selected XML file and am completely stuck. i've read through the Javascript Tools Guide CS6 - XML Object Reference section several times, but i must be missing something. here is my XML:
<xml> <comp> <name>My Comp</name> <width>1280</width> <height>720</height> <fps>24</fps> </comp> <layers> <layer value="Layer Name 1">1</layer> <layer value="Layer Name 2">2</layer> <layer value="Layer Name 3">3</layer> <layer value="Layer Name 4">4</layer> </layers></xml>
and here is my script attempting to parse it:
var config = File.openDialog("Choose A Config File","XML:*.xml");if (config){ var xmlString = config.toString(); var myXML = new XML(xmlString); alert(myXML.length);}else{ alert("Could not open file.");}
i get a blank alert box. future thanks for the help.