how to use php magento api in navision codunit with xml dom management.

I Want to create a codunite to login and push navision data in php magento. for this i want to use navision codeunit “XML DOM Management”. But i don’t know the Actual Syntax or process logic how to create this code unit if any one who know’s how to do this please guide me the logic and process.

Example of My Codeunit for loginRequest

RootNode := XMLRequest.CreateNode(‘element’,‘soap:Envelope’,SOAPNamespace);

XMLDomMgt.AddAttribute(RootNode,‘xmlns:xsd’,XSDNamespace);

XMLDomMgt.AddAttribute(RootNode,‘xmlns:xsi’,XSINamespace);

XMLDomMgt.AddAttribute(RootNode,‘xmlns:soapenc’,SOAPENCNamespace);

XMLDomMgt.AddElement(RootNode,‘SOAP-ENV:Body’,’’,SOAPNamespace,BodyNode);

XMLDomMgt.AddElement(BodyNode,‘ns1:login’,’’,NS1Namespace,LoginNode);

XMLDomMgt.AddAttribute(LoginNode,‘xmlns:ns1’,‘urn:Magento’);

Thanx in Advance.

hi sanjeet,

to create a node with cu 6224 you have fct. AddElement.

you’ll find sample here:

http://blogs.technet.com/b/gediminb/archive/2010/03/24/how-to-create-read-xml-file-from-nav.aspx

http://dynamicsuser.net/forums/p/11702/57481.aspx

Hello Archer , thanks for the sample code. But if you could please explain the process,syntax and concept behind this it will be great help for me. i already have the samples of code, but don’t know the logic behind this.