convert XML to ATN (action-file)
Hi everybody.
I want to convert an XML-File to ATN-File, by using xtools v2.3
ATN to XML works with this snippet, which I found in another forum:
//@show include
//
app;
//
//@includepath "/c/Program Files/Adobe/xtools;/Developer/xtools"
//
//@include "xlib/PSConstants.js"
//@include "xlib/Stream.js"
//@include "xlib/stdlib.js"
//@include "xlib/GenericUI.jsx"
//@include "xlib/Action.js"
//@include "xlib/xml/atn2bin.jsx"
//@include "xlib/xml/action2xml.jsx"
//
//@include "xlib/ActionStream.js"
//@include "xlib/ieee754.js"
//
function main() {
var file = File("SOURCE.atn");
var actFile = new ActionFile();
actFile.read(file);
var xml = actFile.toXML();
Stdlib.writeXMLFile("TARGET.xml", xml);
};
main();
// EOFnow I need the code for opposite direction: XML to ATN but have no idea how.
Currently I am using the "ActionFileFromXML.jsx", but this shows up a GUI, but I need a silent script with
file paths in the parameters.
Would be great if someone can provide me a quick code
Thanks everybody
