I was hoping someone could help me. I want to be able to read an xml file in code rather than through an XMLPort. I know there are other threads out there on this but they can all get a bit confusing especially as it's an area i'm not overly familiar with. Can someone just give me a quick pointer on how I can read the file and the nodes. I keep falling down when I try it so would like just a basic bit of code that I could follow. Any help would be appreciated
0
Answers
it may help.
http://forum.mibuso.com/discussion/4294/reading-xml-file-in-navision
Use Enumurator in 2015 and back or in 2016 https://www.hougaard.com/foreach-statement-available-in-nav2016/
Where RemoveNamespace is:
And this are the local vars:
I've already started refactoring the XMLdocument datatype but I'm completely lost about the other dotnets (StringWriter, XsltArgumentList, XslTransform).
Does anyone have some experience with this?
If you need the transform anyway, have a look at Codeunit 6224 "XML DOM Management", specifically function RemoveNamespaces and Codeunit 3038 "DotNet_XslCompiledTransform", if you want to use your own transform.
But seeing as they still use dotnet variables I don't think we're supposed to use them when we have Target: "Cloud" in the App.json file right?
But I don't really know, just guessing here.