This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML Parsing help needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Parsing help needed " Watch "XML Parsing help needed " New topic

XML Parsing help needed

Perak Patel

Joined: Sep 10, 2004
Posts: 12
Hi all,

I need to parse an xml file say customer.xml which contains the foll:


Now when a particular customer is been selected by some process [say id=1]then , i need to filter that customers xml & pass it back .i.e. my o/p should be as under :


Any light on how to approach this or sample code using any parsers [SAX,DOM,Xerces] is appreciated.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12913
You should go through one of the many Java and XML tutorials on the web.
For example, this one at Sun.
Yours is a common problem and the tutorials contain sample code.
It is sorta covered in the JavaRanch Style Guide.
subject: XML Parsing help needed