How to Import XML File with a complex structure

gjgarciasmgjgarciasm Member Posts: 47
Hi,

I have a problem that I have to solve. One customer has sent to me an example of the daily POS Sales for importing it into NAvision and to create that sales into Navision. My objective is to fill a new Navision table called "POS Sales Entries" from the information provided in the transaction nodes including values form the other nodes: batchs, tpv (POS), ... I mean, I nedd to merge the data in this XML file into a unique Navision table.

The problem is that I am not very experimented importing XMLports and that I don´t know how to do this with this specific file.

Can anybody help me?

Thank you very much.

<Sales>
    <Shops>
        <Shop>
           <id>59</id>
           <shopname>MADRID SUPERMARKET</shopname>
           <TPVS>
              <TPV>
                 <codTPV>1</codTPV>
                 <serialnumber>123456</serialnumber>
                 <version>5</version>
                 <cashierid>134</cashierid>
                 <batchs>
                    <batch>
                       <date>20070425</date>
                       <time>1600</time>
                       <tender>
                          <tendercode>12350</tendercode>
                          <tendername>VISA</tendername>
                          <tendertotalamount>1245</tendertotalamount>
                       </tender>
                       <salesnumber>125</salesnumber>
                       <returnnumber>5</returnnumber>
                       <totalamount>1245</totalamount>
                       <totaltax>135</totaltax>
                       <transactions>
                          <transaction>
                             <id>1</id>
                             <amount>12</amount>
                             <quantity>2</quantity>
                          </transaction>
                       </transactions>
                    </batch>
                 </batchs>
              </TPV>
           </TPVS>
        </Shop>
    </Shops>
</Sales>

Comments

Sign In or Register to comment.