XML - ff6347/extendscript GitHub Wiki
Extendscript has its own way of creating xml objects. It looks a bit wired and breaks every linter, but it works. Take a look into the JavaScript Tools Guide.pdf. You can find it in the ExtendScript Toolkit under "Help>JavaScript Tools Guide"
Here an short example.
var root = new XML('<root/>');
var child = new XML('<achild/>');
var val = 12;
var otherchild = <something name={val}></something>;
child.@number = 12;
child.appendChild (otherchild);
root.appendChild (child);
$.writeln(root.toXMLString());The console result is:
<root>
<achild number="12">
<something name="12"/>
</achild>
</root>