Reputation: 1
I am wondering which is the best way to import XML file like (purchase orders) into Dynamics AX?
Upvotes: 0
Views: 8964
Reputation: 894
It also depends on the size of the XML, we have seen large file sizes that caused the XMLDocument class to consume too many memory because it loads the XML in memory.
You could also use the XMLTextReader if you need performance and you don't need schema validation. If you do need schema validation, you would have to stick to XMLDocument. (check out this article
Check out this article on codeproject that explains XMLTextReader in full detail.
http://www.codeproject.com/Articles/15452/The-XmlTextReader-A-Beginner-s-Guide
Also, I was wondering, do you have ownership of the application that produced the XML file? If it is something you have in your own hands, you might consider creating an AIF Custom service and call this from your other application. (But I guess you are not the owner of the application producing the XML file you want to import.)
Upvotes: 0
Reputation: 6056
There are a few examples available via searching the web...
Axaptapedia suggests two libraries:
Upvotes: 1