CREATE(xmlDoc); xmlMgt.SetNormalCase; NodeLvl := xmlDoc.createElement('parent'); NodeLvl := xmlDoc.appendChild(NodeLvl); xmlMgt.AddElement(NodeLvl,'child','','',NewChild); xmlDoc.save('C:\foobaz.xml'); Variables: Name DataType Subtype Length xmlMgt Codeunit XML DOM Management xmlDoc Automation 'Microsoft XML, v6.0'.DOMDocument NodeLvl Automation 'Microsoft XML, v6.0'.IXMLDOMNode NewChild Automation 'Microsoft XML, v6.0'.IXMLDOMNode
<parent><child/></parent>
<parent><child></child></parent>
<parent>
<child>
</child>
</parent>