I am trying to transform a XML Document ('Microsoft XML, v3.0'.DOMDocument40) in Navision using the transformNode method. I have tested the transformation with XML spy and it worked perfectly.
Does anyone have any experience with XSL transformations in Navision?
My c/al code looks like this:
Variables:
gAutXMLDocument : 'Microsoft XML, v3.0'.DOMDocument40
gAutXSLDocument : 'Microsoft XML, v3.0'.DOMDocument40
gAutXMLDocument.load('e:\test.xml');
gAutXSLDocument.load('e:\transformMyXml.XSL');
gAutXMLDocument.transformNode(gAutXSLDocument);
gAutXMLDocument.save('e:\testnew.xml');
0
Comments
try code of below. I use this concept in my project with no problem.
XMLDocOut,XMLDocIn,XSLTemplate > 'Microsoft XML, v3.0'.DOMDocument30
XSLTemplateNode > 'Microsoft XML, v3.0'.IXMLDOMNode
CREATE (XSLTemplate);
CREATE (XMLDocOut);
CREATE (XMLDocIn);
XMLDocIn.Load('c:\in.xml');
XSLTemplate.Load('c:\template.xsl');
XSLTemplateNode := XSLTemplate.documentElement;
XMLDocIn.transformNodeToObject(XSLTemplateNode,XMLDocOut);
XMLDocOut.Save('c:\out.xml');
Martin