XMLport export - Different structure expected

matthiasclaes
Member Posts: 18
Dynamics NAV 5 sp1 on SQL 2008 RTM 64-bit
I've defined an XMLport as folows:
TagName TagType SourceType DataSource
Drivers Element Text <Drivers>
Driver Element Table <Employee>(Employee)
Code Attribute Field <Employee>::Social Secretariat No.
DriverID Attribute Field <Employee>::No.
Name Attribute Field <Employee>::Last Name
Street Attribute Field <Employee>::Address
ZIPCode Attribute Field <Employee>::Post Code
City Attribute Field <Employee>::City
This outputs an xml file with the following structure:
<?xml version="1.1" encoding="UTF-16" standalone="no"?>
<Drivers>
<Driver Code="00000368" DriverID="A0003" Name="NNN1" Street="SSS1" ZIPCode="ZZZ1" City="CCC1"/>
<Driver Code="00000374" DriverID="A0004" Name="NNN2" Street="SSS2" ZIPCode="ZZZ2" City="CCC2"/>
...
<Drivers>
But those who have to process the file expect a structure like this:
<Drivers>
<Driver>
<Code>.....</Code>
<DriverID>.....</DriverID>
<Name>.....</Name>
....
</Driver>
<Driver>
<Code>.....</Code>
<DriverID>.....</DriverID>
<Name>.....</Name>
....
</Driver>
...
</Drivers>
Is this possible using an XMLport?
I've defined an XMLport as folows:
TagName TagType SourceType DataSource
Drivers Element Text <Drivers>
Driver Element Table <Employee>(Employee)
Code Attribute Field <Employee>::Social Secretariat No.
DriverID Attribute Field <Employee>::No.
Name Attribute Field <Employee>::Last Name
Street Attribute Field <Employee>::Address
ZIPCode Attribute Field <Employee>::Post Code
City Attribute Field <Employee>::City
This outputs an xml file with the following structure:
<?xml version="1.1" encoding="UTF-16" standalone="no"?>
<Drivers>
<Driver Code="00000368" DriverID="A0003" Name="NNN1" Street="SSS1" ZIPCode="ZZZ1" City="CCC1"/>
<Driver Code="00000374" DriverID="A0004" Name="NNN2" Street="SSS2" ZIPCode="ZZZ2" City="CCC2"/>
...
<Drivers>
But those who have to process the file expect a structure like this:
<Drivers>
<Driver>
<Code>.....</Code>
<DriverID>.....</DriverID>
<Name>.....</Name>
....
</Driver>
<Driver>
<Code>.....</Code>
<DriverID>.....</DriverID>
<Name>.....</Name>
....
</Driver>
...
</Drivers>
Is this possible using an XMLport?
0
Answers
-
define them as element:
<element></element>
<element attribute= attribute= attribute=></element>0 -
Sog wrote:define them as element:
Thank you! That's exactly what I wanted. I now understand the setup of XMLports a bit better too.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