Problems getting started using Variables & Datasets
Hello,
I am new to this forum and new to scripting in Illustrator and scripting in general.
I have an XML file containing a number of datasets each consisting of a number of text variables which I want to use to create a deck of trading cards.
Each trading card consists of a Text Field for the title of the card and a number of icons, which are instances of various Symbols
I have written a script to create each card and i can load the variables into my javascript using: newCard.importVariables(new File(xmlPath));
I now need to access the data in the datasets in order to populate the card.
To provide some context, this is an image of one of the cards with placeholder art:

Currently, for the icon in the top right hand corner (the PHASE icon) I am using the following code:
phase = "night";
phaseIcon = newCard.symbols.getByName(phase);
phaseIcon1 = newCard.symbolItems.add(phaseIcon);
phaseIcon1.top = 232;
phaseIcon1.left = 140;
What i want to be able to do, is to pull the value for the <phase></phase> TextVariable from my XML dataset and insert that into the script, but I don't know how. This is where I am stuck as to how to proceed. Any help is greatly appreciated.
Thanks,
Nick