Hey, Have you tried the following in X++
static void usingAXxml(Args _args) { System.Xml.XmlDocument xmlDoc2; str _xml; ; _xml = @' <?xml version="1.0" encoding="utf-8"?> <CustInvoice xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/CustInvoice"> <CustInvoiceTable class="entity"> <CurrencyCode>USD</CurrencyCode> <InvoiceAccount>4000</InvoiceAccount> <InvoiceDate>2009-02-16</InvoiceDate> <OrderAccount>4000</OrderAccount> <CustInvoiceLine class="entity"> <AmountCur>100</AmountCur> <Description>Line 1</Description> <LedgerAccount>11005</LedgerAccount> <LineNum>2</LineNum> <TaxItemGroup>full</TaxItemGroup> </CustInvoiceLine> <CustInvoiceLine class="entity"> <AmountCur>200</AmountCur> <Description>Line 2</Description> <LedgerAccount>11010</LedgerAccount> <LineNum>4</LineNum> <TaxItemGroup>full</TaxItemGroup> </CustInvoiceLine> </CustInvoiceTable> </CustInvoice>'; xmlDoc2 = new System.Xml.XmlDocument(); xmlDoc2.LoadXml(_xml); info(xmlDoc2.ToString()); } May be this is what your looking for??? Thanks Santosh.R --- In Axapta-Knowledge-Village@yahoogroups.com, "giridharraj" <giridhar...@...> wrote: > > Hi, > I am accessing a method in a AX class from dot net directly which takes an > xml document object as a parameter and it should also return xml document > object. I have done that but the problem is the dot net couldn't recognize AX > xml object and even AX couldn't read dot net XML object. It gives me some xml > object cast error. Please tell me how to convert an Ax xml object into dot > net xml object and vice versa. Please give me some solution. > > Thanks and Regards, > Giridhar Raj. >