[jdom-interest] XML - Resursive functions

Hanifa, Syed shanifa at sitg.southam.ca
Mon Jun 19 08:26:16 PDT 2000


Hello,

I need to parse a big xml file  with many children and have to  update the
database with children and their parents.
I have been trying two days but i could not found any solution.

Formate of the xml file:

		<taxNode id=" " name="Root">

			<taxNode id="frist" name="firstelement">
				<taxNode id="firstchild"
name="firstchildelement" />
			</taxNode>

			<taxNode id="second" name="secondelement" />

		</taxNode>

It has to insert data into the db  in the following format:-

		id = 1    title = "root"  			parentid = 0
		id = 2 	title = "firstelement"  		parentid = 1
		id = 3	title="firstchildelement"		parentid = 2
		id = 4    title="secondelement"		parentid = 1

		
		

This is just sample. Each element has many children and siblings. 

Any help in this regard would  be highly appreciated.


Thanks

Syed



More information about the jdom-interest mailing list