• Post Reply Bookmark Topic Watch Topic
  • New Topic

Parsing nested elements with DOM  RSS feed

 
Vito Czz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
element.getElementsByTagName("vaso") should work if I'm not mistaken. Then just add the value to your prodotto.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!