File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes fetching data from xml based on a particualr pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "fetching data from xml based on a particualr pattern" Watch "fetching data from xml based on a particualr pattern" New topic
Author

fetching data from xml based on a particualr pattern

neetha reddy
Greenhorn

Joined: Apr 13, 2004
Posts: 1
i am having xml doc as
<hospitalname>
<rooms>
<general_ward>190</general_ward>
<special_ward>500</special_ward>
<semi_special_ward>500</semi_special_ward>
</rooms>
</hospitalname>

if i give ward in a jsp page it has to display the matches like
general_ward
special_ward
semi_special_ward etc.
how can i do this without using vb script
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
One way could be to write a "DOM walker" which goes through each node in a DOM tree, compares whether the node name ends with "ward", and adds the node into some list if it does.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: fetching data from xml based on a particualr pattern
 
Similar Threads
Entity Bean on JBoss4.0.2
CMP 2.0 problem in Jboss 4.0.2
Storing XML document in Database
CMP beans not entering data in database
CMP 2.0 problem with MySQL server