![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm in a bit of a pickle with an XML problem I'm having and I can't seem to find any sensible answers anywhere. Below is a sample of the XML that I have to work with. *(I filtered outsome of the fields, the Items actually have about 30 elements. I need to split this into 3 tables relationally. *ORDER table, PACKAGE table, ADDRESS table and PACKAGE_ITEMS table. *I'm having a hard time figuring out how to load this in sensibly. *I have no real experience with XML, or Java, however I'm painted into a corner here having to load this in. I thought about just looping through the XML file and pulling out the keys, but I've a feeling that there's something better out there. *If you could provide any leads or advice I'd be HUGELY appreciative and perhaps even name my first child after you. Thanks in advance. ?xml version="1.0" standalone='yes'? Order * <orderReference/ * <orderNumber>2222</orderNumber * <orderUserNumber>333</orderUserNumber * <comments/ * <packages * * <package * * * <packageIndex/ * * * <packageWarehouse/ * * * <packageWeight/ * * * <packageShippingMethod>standard</packageShippingMethod * * * <packageCarrierMethod/ * * * <address * * * * <firstName>John </firstName * * * * <middleName/ * * * * <lastName>Doe</lastName * * * </address * * * <items * * * * <item * * * * * <itemSku>123456</itemSku * * * * * <itemQuantity>1</itemQuantity * * * * </item * * * * <item * * * * * <itemSku>123456</itemSku * * * * * <itemQuantity>1</itemQuantity * * * * </item * * * </items * * * <packagePaymentStatus/ * * * <packagePaidAmount>0</packagePaidAmount * * </package * </packages * <extendedFields/ /vendaOrder |
#3
| |||
| |||
|
|
I'm in a bit of a pickle with an XML problem I'm having and I can't seem to find any sensible answers anywhere. Below is a sample of the XML that I have to work with. (I filtered out some of the fields, the Items actually have about 30 elements. I need to split this into 3 tables relationally. ORDER table, PACKAGE table, ADDRESS table and PACKAGE_ITEMS table. I'm having a hard time figuring out how to load this in sensibly. I have no real experience with XML, or Java, however I'm painted into a corner here having to load this in. I thought about just looping through the XML file and pulling out the keys, but I've a feeling that there's something better out there. If you could provide any leads or advice I'd be HUGELY appreciative and perhaps even name my first child after you. Thanks in advance. ?xml version="1.0" standalone='yes'? Order orderReference/ orderNumber>2222</orderNumber orderUserNumber>333</orderUserNumber comments/ packages package packageIndex/ packageWarehouse/ packageWeight/ packageShippingMethod>standard</packageShippingMethod packageCarrierMethod/ address firstName>John </firstName middleName/ lastName>Doe</lastName /address items item itemSku>123456</itemSku itemQuantity>1</itemQuantity /item item itemSku>123456</itemSku itemQuantity>1</itemQuantity /item /items packagePaymentStatus/ packagePaidAmount>0</packagePaidAmount /package /packages extendedFields/ /vendaOrder |
![]() |
| Thread Tools | |
| Display Modes | |
| |