XMLport export - Different structure expected

matthiasclaesmatthiasclaes 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?

Answers

  • SogSog Member Posts: 1,023
    define them as element:
    <element></element>
    <element attribute= attribute= attribute=></element>
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • matthiasclaesmatthiasclaes Member Posts: 18
    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.
Sign In or Register to comment.