• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML parsing question (nanoxml)

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

(Sorry about broken english)
I have read the nanoxml tutorial and I have manage to do a little program(based on tutorial).

In this program:
1.User gives a name of the .xml file which he/she wants to open
2.File is opened and printed to the screen in this format: <BOAT><BOAT><NAME>Hank</NAME><YEAR>1980</YEAR><CLASS>10</CLASS></BOAT></BOAT>

Now my problem is how to get for example <NAME> value(Hank) from BOAT.xml to Java variable...called String Name??

So I need to get every piece of information from BOAT.xml to different Java variable, but I cannot do that...
I have tried to do this in many ways.... without success, help me on this one please..

-Maria-

JAVA CODE:



BOAT.xml

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic