How to import a nested xml file into database

HakuAnime

New Member
I'm stuck with a problem & that is importing an xml file into a mysql table. The XML file is nested. Somehow I managed to create the table with appropriate columns taken from XML file itself to suit the datatype but I don't have any Idea how do I import a nested XML file into the table. I've done some googling for this but haven't been able to figure out the solution around.Below is a sample snippet from the XML file:\[code\]<Data><supplyupdate> <a001>wiley.com-9780442205676</a001> <a002>12</a002> <productidentifier> <b221>03</b221> <b244>9780442205676</b244> </productidentifier> <b394>07</b394> <b003>19890201</b003> <supplydetail> <supplieridentifier> <j345>07</j345> <b244>0141534</b244> </supplieridentifier> <supplieridentifier> <j345>06</j345> <b244>5030670141531</b244> </supplieridentifier> <website> <b367>02</b367> <b295>http://www.wiley.com/WileyCDA/WileyTitle/productCd-0442205678.html</b295> </website> <j292>01</j292> <j397>WORLD</j397> <j140>AS AG AR AU BS BD BB BM BO BV BR BZ VG BN MM CA KY LK CL CN TW CO CR CU DO EC SV FK GS FJ GD GP GT GY HT HN HK IN ID IQ JM JO KP KR LA LB MY MQ MX MS NP AN AW NZ NI UM PA PG PY PE PH PR KN AI LC PM VC SG SD PM SR SY TH TT TC EG US VI UY VE YE</j140> <j399>The European Distribution Centre (EDC) typically supplies product to Europe, Middle-East, Africa (EMEA). Other territories are supplied by other worldwide Wiley subsidiaries. Please refer to http://www.wiley.com</j399> <j396>51</j396> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>50.5</j151> <j152>GBP</j152> <j153>Z</j153> <j154>00</j154> <j155>50.5</j155> <j156>00</j156> </price> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>69.95</j151> <j152>USD</j152> <j153>Z</j153> <j154>00</j154> <j155>69.95</j155> <j156>00</j156> </price> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>82.3</j151> <j152>EUR</j152> <j153>Z</j153> <j154>00</j154> <j155>82.3</j155> <j156>00</j156> </price> </supplydetail></supplyupdate></Data>\[/code\]If anyone knows how to make it then please, I appreciate any help !!I'd like to add that the file is a bit large in size of 400+MB.
 
Back
Top