Thema: Delphi XML to MySQL

Einzelnen Beitrag anzeigen

Benutzerbild von Computerbabalulu
Computerbabalulu

Registriert seit: 26. Sep 2003
233 Beiträge
 
#3

Re: XML to MySQL

  Alt 4. Okt 2004, 08:47
jetzt hab ich doch noch ein Problem....

Wie soll ich diesen xml File in die DB importieren?

XML-Code:
<batch-section>
    <machine-id> 1 </machine-id>
    <equipment-type> 2 </equipment-type>
    <pricing-data> 0 </pricing-data>
    <order-section>
       <dealer>   809983   </dealer>
       <envelope>   181828   </envelope>

       <department> 41   </department>

       <global>
      <article>   1740   </article>
       </global>

       <part>
       <linecode>8901</linecode>
       <article-section>
      <article>   2651   </article>
      <qty>      52   </qty>
       </article-section>
       </part>

       <part>
       <linecode>8902</linecode>
       <article-section>
      <article>   2651   </article>
      <qty>      53   </qty>
       </article-section>
       </part>

    </order-section>
    <order-section>
       <dealer>   225885   </dealer>
       <envelope>   182038   </envelope>

       <department> 41   </department>

       <global>
      <article>   1149   </article>
       </global>

       <part>
       <linecode>8901</linecode>
       <article-section>
      <article>   1357   </article>
      <qty>      56   </qty>
       </article-section>
       </part>

       <part>
       <linecode>8902</linecode>
       <article-section>
      <article>   1357   </article>
      <qty>      54   </qty>
       </article-section>
       </part>

       <part>
       <linecode>8903</linecode>
       <article-section>
      <article>   1359   </article>
      <qty>      1   </qty>
       </article-section>
       </part>

    </order-section>
</batch-section>
Hier gibt es 2 oder sogar manchmal auch noch mehrmals den Abschnitt <Part> (bis zu 10x) Also Lincode 8901 - 8910 wenn das hilft?

In der Tabelle soll es dann so stehen....

"dealer","envelope","department","Articel_Global", "Lincode1","Article1","qty1","linecode2","Article2 ","qty2" usw....

Jemand ne Idee ?

Bissher habe ich oben stehenden code verwendet...........

Gruß Frank
Frank
  Mit Zitat antworten Zitat