CREATE(XMLdocOut); XMLdocOut.loadXML('<?xml version="1.0" encoding="UTF-8" ?><Root_Node/>'); XMLCurrNode := XMLdocOut.documentElement; XMLNodeTEMP := XMLCurrNode.ownerDocument.createNode('element', 'Name_1st_Node', ''); XMLNodeTEMP.text := 'Value_1st_node'; XMLCurrNode.appendChild(XMLNodeTEMP); XMLCurrNode := XMLNodeTEMP; etc...
<?xml version="1.0" encoding="UTF-8"?> <Root_Node><Name_1st_Node>Value_1st_node</Name_1st_Node></Root_Node>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xxxx> <Root_Node><Name_1st_Node>Value_1st_node</Name_1st_Node></Root_Node>