This discussion is archived
6 Replies Latest reply: Aug 14, 2012 1:52 AM by Jens802561 RSS

XML to CSV denormalization/conversion

Jens802561 Newbie
Currently Being Moderated
Hi all

I have an xml file as shown below and want to denormalize it to csv files for import into an Oracle 11gR2 DB using dataload.

How should this be done, I have been told that xslt can do it but I am not sure how to do it and how to make xslt create seperate csv files for the elements that have unbounded max occurencies.

<LEVERANSE>
<POST>
<ISBN13>9788282490542</ISBN13>
<EAN>9788282490542</EAN>
<FSSN>150137212</FSSN>
<AKTOER_BOK NAVN="Manning, Mick" ROLLE="Forfatter" ID="685142"/>
<AKTOER_BOK NAVN="Granström, Brita" ROLLE="Illustratør" ID="685143"/>
<TRYKKET>2012</TRYKKET>
<OPPLAG>1</OPPLAG>
<SPRAAK KODE="bm" TEKST="Bokmål"/>
<STATUSMELDING DATO="" KODE="21"/>
<EMNE LITTFORM="Billedbøker"/>
<NIVAA VOKSEN_BARN="3-6" FOM="3" TOM="6"/>
<DISTRIBUTOER>EGEN</DISTRIBUTOER>
</POST>
<POST>
<ISBN>1742205917</ISBN>
<ISBN13>9781742205915</ISBN13>
<EAN>9781742205915</EAN>
<TITTEL HOVED="Western USA"/>
<AKTOER_BOK NAVN="Manning, Mick" ROLLE="Forfatter" ID="685142"/>
<FORLAG>Lonely Planet</FORLAG>
<VAREGRUPPE KODE="32010" TEKST="Amerika"/>
<BOKGRUPPE KODE="602" TEKST="Verk. Sakpr. voksne"/>
<INNBINDING KODE="h" TEKST="Heftet"/>
<LITTERATURTYPE>Faglitteratur</LITTERATURTYPE>
<UTGAVE AAR="2012" NR="1"/>
<TRYKKET>2012</TRYKKET>
<OPPLAG>1</OPPLAG>
<SPRAAK KODE="eng" TEKST="Engelsk"/>
</POST>
</LEVERANSE>

I appreciate any input!

Rgds
Jens Erik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points