XML port export structure

racaka
Member Posts: 4
Hi,
I would need some help. I have a table with two fields.
I need to export all the records in this table, first field as an attribute, and second field as an element. Now I have "unnecessary" elements around, for the table source type XML port row.
My XML port seems like this:
I awaited there will be a root node for the table, and all the records within.
But I have <Tablename> nodes around each record:
May I have this without separated <Tablename> nodes for every record, like this?:
What do you think? Any help is warmly welcome.
Thanks,
Rac
I would need some help. I have a table with two fields.
I need to export all the records in this table, first field as an attribute, and second field as an element. Now I have "unnecessary" elements around, for the table source type XML port row.
My XML port seems like this:
TagName TagType SourceType DataSource Tablename Element Table <Tablename>(Tablename) Field1 Element Field <Tablename>::Field1 Field2 Attribute Field <Tablename>::Field2
I awaited there will be a root node for the table, and all the records within.
But I have <Tablename> nodes around each record:
<Tablename> <Field1 Field2="data11">data12</Field1> </Tablename> <Tablename> <Field1 Field2="data21">data22</Field1> </Tablename> <Tablename> <Field1 Field2="data31">data32</Field1> </Tablename>
May I have this without separated <Tablename> nodes for every record, like this?:
<Tablename> <Field1 Field2="data11">data12</Field1> <Field1 Field2="data21">data22</Field1> <Field1 Field2="data31">data32</Field1> </Tablename>
What do you think? Any help is warmly welcome.
Thanks,
Rac
0
Comments
-
Did you indent your elements?
Something like:Tablename Field1 Field2
0 -
Thanks, I did.
I corrected the formatting of my original post.
And yes, this is why I await this node should appear only once, and to contain all the records within that node.
It works, if I use only attributes within that element with Table source type to enumerate all the records in the table.
However, if I would enumerate all the records as elements, I get "double" elements:<Table><Record>Data1</Record></Table> <Table><Record>Data2</Record></Table>
I need only:<Table> <Record>Data1</Record> <Record>Data2</Record> </Table>
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