This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 13018
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.
I agree. Here's the link:
subject: XML Parsing help needed
It's not a secret anymore!