Importing XML file Issues

ChowdaryChowdary Member Posts: 148
edited 2013-02-19 in NAV Three Tier
Hi NAVExperts

I'm having dificulty understanding the error, please help me out

XML Structure
<Root>
<Header>
<Element1>data</Element1>
<Element2>data</Element2>
<Element3>data</Element3>
etc.,
</Header>
<Header2>
<Element1>data</Element1>
<Element2>data</Element2>
<Element3>data</Element3>
<addr loop/> {somany elements}
<datetime loop/> {somany elements}
<reference loop/> {somany elements}
<transport loop/> {somany elements}
<Item loop/> {somany elements}
</Header2>
</Root>

Like this many indentation inside elements on the XML file. I'm trying to import the data into one table. I guess that is what I'm doing wrong
Is it possible to import files like this with XMLPorts?

Please see the attachemnet of sample XML file

any ideas highly appreciated :thumbsup:

Thank You
Chowdary
Pleasure in the job puts perfection in the work

Comments

  • ara3nara3n Member Posts: 9,256
    What is the error you are getting?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ChowdaryChowdary Member Posts: 148
    If you see on the file attached, if I want to use the same table after a text Element I'm getting the following error while compiling

    Error: You must specify a Table DataSource before you can select a Field DataSource.

    Thank You
    Chowdary
    Pleasure in the job puts perfection in the work
  • ara3nara3n Member Posts: 9,256
    XMLport needs to know when to insert the record.

    You cannot use staging 1 fields and then staging 2 fields and then go back to staging 1 fields.

    Create staging 3 table/fields of type temporary and store fields that way. Then write code on postxmlport to populate your actual record.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.