Expand my Community achievements bar.

How to programmatically create an XML file

Avatar

Level 9
Hi

Can anyone help with creating an XML file programmatically.
I know how to use:
var xml = XMLData.parse("", false );
to create an initial document.

But how do I append new nodes to this document, and set their values?

I've had a look at xml.nodes.append(...), but:
a) this appears to be undocumented, does anyone know where I can find documentation on this
b) it appears to require a node as a parameter, and I can't find a way to create a node. (createNode() doesn't appear to exist on the xml variable.)

Many thanks,
Howard
1 Reply

Avatar

Former Community Member
Hi Howard,



There's an example on page 674 of the XML Form Object Model Reference that deals with programmatically creating a data node. Maybe that will help you.



Chris

Adobe Enterprise Developer Support