Atn to XML
Posted: Sun Nov 06, 2011 4:14 pm
Morning all. Long time no see
I'm back to working on another project - using the ActionFileToXML.jsx file as an example I've tried to read an atn file in an dump it to an XML using :
Code: Select allvar actFile = new ActionFile();
actFile.read(form.InputFile);
var xml = actFile.toXML(actFile.file.name);
// xml = xml.toXMLString(); <- this throws an error?
Stdlib.writeToFile(pOutputFolder + "/Original.xml", xml, 'UTF-8', 'unix');
If I leave the xml.toXMLString() commented out, all appears to work fine except the XML is stripped of all the id and key attributes that are present if I convert it with the original ActionFileToXML script.
If I uncomment that line, it throws an error that toXMLString is not a function. Given the code above is almost identical to that found in the process section of ActionFileToXML I'm at a loss as to what I've managed to muck up. Any idea what I'm doing wrong?
Regards,
Anna
I'm back to working on another project - using the ActionFileToXML.jsx file as an example I've tried to read an atn file in an dump it to an XML using :
Code: Select allvar actFile = new ActionFile();
actFile.read(form.InputFile);
var xml = actFile.toXML(actFile.file.name);
// xml = xml.toXMLString(); <- this throws an error?
Stdlib.writeToFile(pOutputFolder + "/Original.xml", xml, 'UTF-8', 'unix');
If I leave the xml.toXMLString() commented out, all appears to work fine except the XML is stripped of all the id and key attributes that are present if I convert it with the original ActionFileToXML script.
If I uncomment that line, it throws an error that toXMLString is not a function. Given the code above is almost identical to that found in the process section of ActionFileToXML I'm at a loss as to what I've managed to muck up. Any idea what I'm doing wrong?
Regards,
Anna