Hello!
I am working on a rather complex XMLport in Navision 2018 and have been struggling with it since four days. I have attached a picture of an example XML file structure that needs to be imported.
I also marked the problem area on the screenshot and will explain my problem according to the color structure,
Red:
When using namespaces within the XML Port Navision wont detect the correct namespaces for XML Nodes that do not have a namespace attached to them.
For example, when trying to import the below structure, it will crash on <tradeItem> stating that it expected <catalogue_item_notification:tradeItem>
catalogue_item_notification is set as default namespace so it should be able to import, even without an explicit statement of the namespace, as <tradeItem> is within a node that uses a namespace.
We have to bulk import multiple XML files with 4000 lines on average and therefore can not rely on manually adding the namespaces for the import to work.
Yellow:
The XML files contain sequences that all share the node name, attributes and textvalues. How would I build an XML Port to detect sequences?
What we want to achieve:
One XML file should create multiple lines in a single table. For each <tradeItem> a line should be created and for each <childTradeItemLink> as well.
What I have tried:
Manually creating a XMLport, with the result of the described errors.
Generating an XMLport based on a XSD file which I created with a XML to XSD converter. The xml files use multiple XSD schemes that all can have varying fields.
Building a XMLport with DotNet components, didn't work either.
Building a Python program that converts the xml files to a Pandas dataframe and spits out a CSV file which would be easier to import. The complexity of the XML file made that too difficult though.
Any ideas on how to solve our issue? It doesn't seem like its simple to create a XMLport for complex XML files with Navision 2018...