[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


xml on browser with its tags

Posted on 2004-11-08
Medium Priority
Last Modified: 2013-11-19
i have table in db which stores the data in xml format
shown below for particular user id..


and i am trying to display whole xml segment including its tag
for each user id on browser with "JSP". but browser only displays data
not the whole xml segment for each individual user id..
so output should be like this


can we do that without using xslt???
Question by:ghatlodia
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 35

Accepted Solution

TimYates earned 100 total points
ID: 12524973
you need to replace the "<" with "&lt;" and the ">" with "&gt;"

Then the browser will render it ok :-)


<%= xml.replaceAll( "<", "&lt;" ).replaceAll( ">", "&gt;" ) %>

that may work (but it probably need some escape chars in it ;-) )
LVL 35

Expert Comment

ID: 12525039
just tested it...works fine :-)

Author Comment

ID: 12525680
thanks  TimYates   now it is working fine..

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question