XML help

From: NavEEd <naveed010_at_hotmail.com>
Date: Fri, 6 Feb 2009 11:23:12 -0330
Message-ID: <498c4ed9$0$5488$9a566e8b_at_news.aliant.net>

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'?>


<firstName>John </firstName> <middleName/> <lastName>Doe</lastName>
<item> <itemSku>123456</itemSku> <itemQuantity>1</itemQuantity> </item> <item> <itemSku>123456</itemSku> <itemQuantity>1</itemQuantity> </item>
</vendaOrder> Received on Fri Feb 06 2009 - 08:53:12 CST

Original text of this message