MySQL Forums
Forum List  »  Connector/Node.js

XML upload into Tables where differnt XML tags in File
Posted by: james flowers
Date: March 04, 2009 10:58AM

I have a XML file sent by a vendor that has a structure as below

- <top>
- <root>
- <branch>
<leaf>1</leaf>
<leaf2>1a</leaf2>
<leaf3>1b</leaf3>
</branch>
</root>
- <parent>
- <child>
<grandchild>2</grandchild>
<grandchild2>2a</grandchild2>
<grandchild3>2b</grandchild3>
</child>
</parent>
- <motorway>
- <aroad>
<broad>3</broad>
<broad2>3a</broad2>
<broad3>3b</broad3>
</aroad>
</motorway>
</top>


I know we can load this into tables using an upload facility, but how can we tell it to direct it to different tables according to its XML tag <root>,<parent> and <motorway>

Tables

Root
leaf|leaf1|leaf2
1 1a 1b
Parent
grandchild|grandchild1|grandchild2
2 2a 2b
Motorway
broad|broad1|broad2
3 3a 3b



Thanks James



Edited 3 time(s). Last edit at 03/04/2009 11:49AM by james flowers.

Options: ReplyQuote


Subject
Written By
Posted
XML upload into Tables where differnt XML tags in File
March 04, 2009 10:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.