-
Reading XML using expressions
I’ve been trying to read in an XML using expressions. I saw in the forum that it IS possible, through this link: https://forums.creativecow.net/thread/227/20842
However, when I implement the code, it gives me an error that says: class ‘global’ has no property named ‘myXmlFile’
the code is here:
var fileOK = myXmlFile.open("r");
if (fileOK){
var myXmlString = myXmlFile.read();
var myRoot = new XML (myXmlString);
myXmlFile.close();
}
I notice that there is an object named ‘myXmlFile’ now how do I create it? I know var fileOk is an object that does something with ‘myXmlFile’ but HOW do I create the var for myXmlFile? and what is “r” ? to read?
Sorry, new to javascript. It’s so different from other languages.