Skip navigation
Currently Being Moderated

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

Jun 3, 2010 4:20 AM

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;

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points