I'm writing a job that needs to insert required nodes into an XML document before having AIF scoop up the file. Anyway, I can declare XMLDocument to load the XML, but as soon as I try creating nodes from the document as this supposed class that is defined in MSDN's X++ reference, I get this error. What gives, how do I load these apparently missing libs?
*This post is locked for comments
I have the same question (0)Stephale:
You have to create the XMLNode in the XMLDocument before you can append it. An overly simplified example is:
XMLDocument xmlDoc;
XMLNode node;
;
xmlDoc = new XMLDocument();
node = xmlDoc.createElement('MYNODE');
node.text('MyText');
xmlDoc.appendChild(node);
info(xmlDoc.xml());
The return from "xmlDoc().root()" is an XMLNode. To operate at a deeper level, just replace it with an XMLNode of the level you are working on.