XML Port error

navgirl1981
Member Posts: 12
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 ?
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 ?
0
Comments
-
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions