XML Export

XMLDocument myXML = new XMLDocument(); XMLNodeList myList; XMLNode n; ; myXML.createTextNode(“tn”); n = myXML.createTextNode(“tn”); n.nodeValue(“aaaa2”); // This doesn’t work, I don’t know how to assign name/value to root node myXML.root().appendChild(n); myXML.save(“C:\mile.xml”);

I have done it with this Syntax: XMLDocument XMLDocument; XMLDataExport XMLDataExport; XMLProcessingInstruction XMLProcessingInstruction; XMLNode XMLNode; XMLAttribute attribute; XMLNamedNodeMap NodeMap; ; XMLDocument = new XMLDocument(); XMLDataExport = new XMLDataExport(""); XMLProcessingInstruction = XMLDocument.createProcessingInstruction(‘microsoft.xmldom’, "version = “1.0"”); XMLDocument.appendChild(XMLProcessingInstruction); XMLNode = XMLDocument.createElement(“firstTag”); XMLNode = XMLDocument.appendChild(XMLNode); nodeMap = XMLNode.attributes(); attribute = XMLDocument.createAttribute(“Attribute”); attribute.text(“text text”); nodeMap.setNamedItem(attribute); XMLDocument.save(“c:\Axapta.xml”);