ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Reading XML using expressions

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Frank LimaReading XML using expressions
by on Jun 13, 2012 at 1:04:14 am

I've been trying to read in an XML using expressions. I saw in the forum that it IS possible, through this link:

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 ="r");
if (fileOK){
var myXmlString =;
var myRoot = new XML (myXmlString);

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.

Return to posts index

Frank LimaRe: Reading XML using expressions
by on Jun 13, 2012 at 1:35:29 am

If I create the var such as:
var myXmlFile = new File(testXMLPath);

testXMLPath = "happy.xml";

It throws an error and says: "File does not have a constructor"

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved