This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML keyword search Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic

XML keyword search

krishna moorthyv

Joined: Dec 13, 2012
Posts: 7
For an XML keyword search project, users may search any value in the XML code

<?xml version="1.0" encoding="UTF-8"?>
<staff id="1001">
<staff id="2001">
<staff id="3001">

If the user searches for 20000, the result will available in ID 1001 and 2001 so the output should be like:


I need code to do this in Java.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60740

Where is your code? What problems are you having with it? Please be sure to read NotACodeMill.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60740

I've closed this due to a new topic being posted.
I agree. Here's the link:
subject: XML keyword search
Similar Threads
XML file parsing in Java using SAX
Dom to JAXB
How to get a xml id value in java
code to read the xml and also overide the value of certain attributes in xml at runtime itself
The pain of a beginner developer - deciphering cryptic documentation and such