Link to home
Start Free TrialLog in
Avatar of ShamD
ShamD

asked on

Formating and Displaying XML data, in a JSP?

I am writing a web page wrapper for another website that gives results back from a search of Documents.
I am creating it using JSP & Servlets. I allow the user to enter in a Search word on the webpage and hit submit, this search word gets passed from the JSP to a Servlet. The servlet then adds this query to a url and hits another website to get back info.
It all works fine and the information that is returned is like...Author, Book Name etc.

But it comes back in a StringBuffer. The StringBuffer is just full of text and the text is in XML. I am not sure of what is the best way to seperate out the data so it can be displayed back neatly onto a JSP.
Not sure what the best way to parse this data is?

Can anyone help?
ASKER CERTIFIED SOLUTION
Avatar of jcoombes
jcoombes
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tomas Helgi Johannsson
    Hi!

Here is several JSP XML examples to look at :
http://www.java2s.com/Code/Java/JSP/XML.htm
http://www.java2s.com/Code/Java/JSP/JSPXMLandXSLTtransform.htm

Regards,
   Tomas Helgi