Hi ,
I am trying to export records in xml format with automation but it is breaking on below code :
XMLRoot := XMLDoc.documentElement;
XMLNode := XMLRoot.ownerDocument.createNode('element', 'TableRecord', '');
XMLRoot.appendChild(XMLNode);
System is throwing an error that automation variable is not instantiated .Please suggest what i am missing here
Thanks in advance !!
0
Comments
Name DataType Subtype Length
XMLDoc Automation 'Microsoft XML, v3.0'.DOMDocument
XMLRoot Automation 'Microsoft XML, v3.0'.IXMLDOMNode
XMLNode Automation 'Microsoft XML, v3.0'.IXMLDOMNode
And XMLDoc is created.
Microsoft - Dynamics NAV
Microsoft - Dynamics NAV
Be advised that the error: "Automation has not been instantiated" or something to that effect can also arise when you try to select a tag in an XML document if that tag is not present. Not a very descriptive error to give but if Ie. you try to select a non-existent tag name <ThisTagIsNotInTheXML> then you will not be told that the tag does not exist. Instead you will get an Automation error if you try to use the Node without first checking with ISEMPTY if a node was actually returned.
Tommy
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!