XML response from OData services

If you call OData services in AX 7 (Dynamics 365 for Finance and Operations), you typically get data in JSON format, like this: { "@odata.context":"https://myaxinstance.cloudax.dynamics.com/data/$metadata","value":[ { "name":"ElectronicPaymentTypes","kind":"EntitySet","url":"ElectronicPaymentTypes" },{ "name":"ExpensePaymentDetails","kind":"EntitySet","url":"ExpensePaymentDetails" } … ] } JSON is a simple, lightweight format with good support in many tools, but sometimes you would rather get XML. XML is by …

Continue reading ‘XML response from OData services’ »

XML DocType in X++

Let’s say that we want to use X++ to create an XML file with the following DocType definition: <!DOCTYPE MyType SYSTEM "http://www.validome.org/check/test.dtd"> AX has Xml* classes (e.g. XmlDocument) for such purpose, but let’s build it with .NET classes first (you’ll see why in a moment). This is X++ code calling .NET classes through .NET Interop: …

Continue reading ‘XML DocType in X++’ »

Parsing XML files with .NET Interop

Today I want to show how to download XML files from internet, validate, parse and use them in Dynamics AX 2012. It’s also yet another example of how we can simplify implementation by using appropriate .NET APIs and seamlessly integrate such a code with Dynamics AX. Our data source will be daily exchange rates provided …

Continue reading ‘Parsing XML files with .NET Interop’ »

Zpracování XML přes .NET Interop

Dnes chci ukázat, jak můžete stahovat XML soubory z internetu, validovat, parsovat a použít je v Dynamics AX 2012. Je to také další příklad toto, jak můžeme implementaci zjednodušit pomocí vhodných .NET API and pohodlně takový kód integrovat s Dynamics AX. Zdrojem našich dat budou denní směnné kurzy poskytované Evropskou centrální bankou jako jednoduchý XML …

Continue reading ‘Zpracování XML přes .NET Interop’ »