XMLport import error when Nodename ends twice

StFiStFi Member Posts: 2
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.
woy0hula1hln.png

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

XMLport
iubdacpfa0mu.png
(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.


Best Answer

  • StFiStFi Member Posts: 2
    Answer ✓
    Hello mibuso-members

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


    If someone has a better workarround i'll be happy.
    (Because the intended XMLSample should be MinOccurs / MaxOccurs = once)

Answers

  • StFiStFi Member Posts: 2
    Answer ✓
    Hello mibuso-members

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


    If someone has a better workarround i'll be happy.
    (Because the intended XMLSample should be MinOccurs / MaxOccurs = once)
Sign In or Register to comment.