A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
iterate through string get elements
Joined: Apr 15, 2005
Oct 10, 2005 01:53:00
hi all can someone please tell me how i convert a
to xml, so that i can iterate through it and grab the elements and their values
e.g. if my string is this
String xml = "<person><firstname>first</firstname><lastname>first</lastname></person>";
i want to iterate through to get the firstname and lastname elements and then get their vlaues
thanks for any help
Joined: Sep 28, 2005
Oct 10, 2005 02:20:00
You can use XML parsers.
Look at the javax.xml.parsers package.
Regards,<br />Seb<br /> <br />SCJP 1.4
Joined: Oct 13, 2004
Oct 10, 2005 05:07:00
Have a look at various XML parsers available
DevSquare - Online Application Development
I agree. Here's the link:
subject: iterate through string get elements
XStream --> getting "id=someId"
SOS--------display data collection from database
XSL/Xpath help needed
Handling nested xml
Inserting into table with Hibernate question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015