0 Replies Latest reply: Jun 3, 2010 4:20 AM by Hanaan Rosenthal RSS

    XML parsing with JS works on Mac -not Windows HELP!

    Hanaan Rosenthal Community Member

      Hi,

      I created an Illustrator CS3 JS script that parses XML successfully on Mac.

      When run on Windows it fails to recognize the elements.

      Client is waiting for this to work and I am out of answers...

       

      Any ideas/thoughts?

      Are the paths different?

       

      on Mac: FundXmlCount=17

      on Windows: FundXmlCount=0

      Here's the script:

      var dataFolderPath = /path/to/directory/";

      var dataFile = new File(dataFolderPath+dataFileName);

      dataFile.open ("r");

      dataFile.seek(0);

      var xmlText = dataFile.read ();

      var FundXmlObject = new XML (xmlText);

      var FundXmlCount = FundXmlObject.Fund.length();

      return FundXmlCount;