Hello mibuso-members
I've got a Problem with an XML import. I get the Files from the Customers and can't change how they are.
Here's an example how the XML-Files look.
It all works when the "NotMandatory"-Field isn't empty (No.1). As soon it's empty (No.2), two closing </XMLSample>-Nodes appear and Navision gives an Error.
XMLport
(Of course the "NotMandatory" is:
minOccurs = Zero,
maxOccurs = Once)
As i said, i can't change how the XML-Files from the Customer looks, these are valid Files (XML-Validator). All works well until a "NotMandatory" isn't in the XML-File and 2 closing </XMLSample> - Node came.
Answers
I've found the solution (even if it's a strange one).
As soon i changed the "MaxOccurs"-Property of the intended XMLSample to "Unbounded" it worked.
If someone has a better workarround i'll be happy.
(Because the intended XMLSample should be MinOccurs / MaxOccurs = once)