aspose file tools
The moose likes JSP and the fly likes Tag library that can display 'pretty' XML 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 » Java » JSP
Reply Bookmark "Tag library that can display Watch "Tag library that can display New topic
Author

Tag library that can display 'pretty' XML

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Hi all,

I'm currently displaying XML messages for a client by getting them to open the XML in a new window/tab as teh text/xml type (which means that most browsers automatically format the XML to be indented etc). What I'd like to do is to use a tag lib to be able to display nicely indented XML in a <div> or <span> section (or similar).

FYI - I'm also asking a similar Q in our XML section asking about a server side library that can prettify the XML before it gets to the web browser.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3829
Martijn Verburg wrote:

FYI - I'm also asking a similar Q in our XML section asking about a server side library that can prettify the XML before it gets to the web browser.


I am not sure if it would help but you can use XSLT to transform XML into HTML. This transformation happens at server side only.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Thanks, that is what I've done for now, but I've also discovered a Javascript library that might do the trick, which is a little nicer as this is purely a 'view' problem.
 
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: Tag library that can display 'pretty' XML
 
Similar Threads
custom tag not working
XML library that can 'prettify' XML?
How portable are Custom Tag Libraries?
Use Weblogic to Run Custom JSP Tag -- Please Help!!!
Problems making Struts/JSTL 1.2 site work with JSTL 2.0