An XML generator that takes XPath-like input and generates XML document.
CCRxXMLGenerator | An XML generator that takes XPath-like input and generates XML document. |
Preference Dialog | None. |
Comments | Below is a sample usage of xml generator. |
Functions | |
addNode | |
addAttribute | |
clear | |
generate |
Below is a sample usage of xml generator.
var x = this.xmlMolecule.generator; x.clear(); x.addNode('/Test', ''); x.addNode('Subject', 'Book'); x.addNode('/Test/Subject', 'new year'); x.addAttribute('/Test/Subject[0]', 'Controvertial', 'Yes'); x.addNode('/Test/Date/Value', '56789'); x.addAttribute('/Test/Date', 'UTC', 'true'); x.addAttribute('/Test/Date', 'Daylight', '2'); var output = x.generate();
And the output looks like below.
<Test> <Subject Controvertial="Yes" >Book</Subject> <Subject>new year</Subject> <Date UTC="true" Daylight="2" > <Value>56789</Value> </Date> </Test>