XML Port error

navgirl1981navgirl1981 Posts: 12Member
edited 2013-04-22 in NAV Three Tier
I am having a strange issue with importing an xml file via an xml port.

Below is the format of the XML file

?xml version="1.0" encoding="utf-8"?>
<Orders>
<o OrderID="22" CustNo="2-PATW" PoNum="HELLO" Comments="Cut pizza into squares." OrderTotal="1181.4903" TimeSubmitted="2013-04-10T16:29:11.227">
<l OrderLineID="22" ItemNo="PFTA60DE" LocationCode="" Qty="1" Price="391.8537" LineTotal="391.8537" />
<l OrderLineID="23" ItemNo="PF520137" LocationCode="" Qty="1" Price="472.3839" LineTotal="472.3839" />
<l OrderLineID="24" ItemNo="RY002003F" LocationCode="" Qty="1" Price="54.1485" LineTotal="54.1485" />
<l OrderLineID="25" ItemNo="CN52INSKPA" LocationCode="" Qty="2" Price="91.1250" LineTotal="182.2500" />
<l OrderLineID="26" ItemNo="VNSKABG" LocationCode="" Qty="2" Price="40.4271" LineTotal="80.8542" />
</o>
</Orders>


I get an error saying that " The element Order has incomplete content. List of possible elements expected is 'o,l'"

Now,I ran an export to test my file output and here is the output that I am getting as far as format is concerned.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
- <Orders>
- <o>
<OrderID>1-17688-SO</OrderID>
<CustNo>3-LETV</CustNo>
<PoNum>12121</PoNum>
<Comments />
<OrderTotal />
<timeSubmitted />
</o>
- <l>
<OrderLineID />
<ItemNo>EADE25</ItemNo>
<LocationCode>NP</LocationCode>
<Qty>1</Qty>
<LineTotal />
</l>
- <l>
<OrderLineID />
<ItemNo>EADE25</ItemNo>
<LocationCode>NP</LocationCode>
<Qty>1</Qty>
<LineTotal />
</l>
</Orders>



So looking at this threre is smth wrong with my XML port properties but I can not figure it out.
Any ideas ?

Comments

  • SogSog Posts: 1,011Member
    why are elements and attributes mixed?
    Your export testfile has all elements with no attributes, while the orderid, customerno, ... are attributes in your o element.

    Don't mix those up.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
Sign In or Register to comment.