| Author |
Parsing nested elements with DOM
|
Vito Czz
Greenhorn
Joined: Mar 21, 2011
Posts: 6
|
|
Hi everybody, i'm trying to parse an xml file like this:
I need to save values of the elements into some variables, to access and print them... I've started writing the java code:
Now, the problem is: how can I access the elements under <pezzatura> tag and associate them with the prodotto element I've created?
|
 |
Wouter Oet
Saloon Keeper
Joined: Oct 25, 2008
Posts: 2700
|
|
|
element.getElementsByTagName("vaso") should work if I'm not mistaken. Then just add the value to your prodotto.
|
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
|
 |
 |
|
|
subject: Parsing nested elements with DOM
|
|
|