Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
XML and Related Technologies
How to pasrse XML string quickly in java
Joined: Nov 25, 2007
Nov 28, 2007 00:13:00
Could you please tell me how to parse xml
Ex. I have a string like this
String str ="<A><b>10</b>
how to get the values of it?
Joined: Sep 11, 2006
Nov 28, 2007 00:32:00
You can use SAX or DOM for that. DOM is easier to use than SAX. You can also you dom4j, which is easier than the normal DOM.
Do some google search. There are lot of tutorials on how to parse XML using DOM or SAX.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
Joined: Feb 15, 2005
Dec 06, 2007 21:06:00
dFactory = DocumentBuilderFactory.newInstance();
dBuilder = dFactory.newDocumentBuilder();
Document doc = dBuilder.parse(new
I agree. Here's the link:
subject: How to pasrse XML string quickly in java
How to get a part of xml document in String format
render string array in xslt
help needed with sax parser
Get data for child using jdom
How to Marshal special chars from Java to XML (&, etc)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015