Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

Navision 18 - Trouble with namespaces and sequences in XML import

Posted on by 2

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...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans