Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display XML DOM based data on a JSP client page?  RSS feed

 
johnwest west
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I need some help in understanding what to do next.

I need to write a web based search function to find medical records from an XML file.
The operator can enter either part or all of a patient name and Hit Search on the JSP web page.

The server is suppose to then return a list of possible patient names with the opportunity for the operator to go to next page until a possible patient is found. They can then select the person and view more details.

On the Server side

I have an XML file with about 100,000 records. There are five different types of records in the file. (This is roughly about 20,000 x 5 = 100,000).

I have a java class to source the xml file and create a DOM to traverse the data elements found on the file.

Here is where I need help

Once I have the DOM how do I go forward in letting the client know what was found in the XML file?

Do I create a MAP to hold the element node links and then forward say 50 links at a time to the JSP and then wait to send some more links when the user hits next page?

Is there an automated way of displaying the links, either via a Java Script, Jquery, XSLT or do I just create a table in HTML and place patient links inside the rows? Is there some rendering specific thing I have to do in order to display the data depending on the browser used by client?

Any guidance, tutorials, examples or books I can refer to would be greatly appreciated.

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your might want to check out the "x" class of the JSTL tags that are meant to allow a JSP to consume XML.
 
Salil Vverma
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are looking for a client side solution for searching and pagination. You can use JQuery data table. The sample example can be accessed from following link - https://datatables.net/examples/api/regex.html

For bringing only the required contents to html, you can use x class of JSTL or XSLT with JAXP at server side, to identify only the required contents.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!