• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tag library that can display 'pretty' XML

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic