View Single Post
Old 12-23-2012, 05:55 PM   PM User | #12
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Quote:
Originally Posted by rajdeep01 View Post
I'd like to display a XML document inside a HTML page as a nicely pretty printed tree structure. I'd like to be able to expand and collapse tree branches. For example Firefox browser does this when you load a plain XML file.
The simplest way would be to load the XML document into an iframe. You are relying on the user's browser to display the collapse/expand tree structure, but this has got to be better than trying to build these yourself. (The user could always copy the XML to an XML-viewer.)

Added: Of course, the XML has to come from the same domain.

Apparently there is an issue with Chrome displaying XML in an iframe.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 12-23-2012 at 05:59 PM..
AndrewGSW is offline   Reply With Quote