File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

XML keyword search

 
krishna moorthyv
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
For an XML keyword search project, users may search any value in the XML code

<?xml version="1.0" encoding="UTF-8"?>
<company>
<staff id="1001">
<firstname>sachin</firstname>
<lastname>tendulkar</lastname>
<nickname>TON</nickname>
<salary>100000</salary>
</staff>
<staff id="2001">
<firstname>MS</firstname>
<lastname>Dhoni</lastname>
<nickname>MSD</nickname>
<salary>200000</salary>
</staff>
<staff id="3001">
<firstname>yuraj</firstname>
<lastname>singh</lastname>
<nickname>yuvi</nickname>
<salary>200000</salary>
</staff>
</company>

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

ms
dhoni
msd
200000

yuraj
singh
yuvi
20000
I need code to do this in Java.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Where is your code? What problems are you having with it? Please be sure to read NotACodeMill.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I've closed this due to a new topic being posted.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic