ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Reading XML using expressions

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Frank Lima
Reading XML using expressions
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 Lima
Re: Reading XML using expressions
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 >>
© 2018 All Rights Reserved