Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML in HTML

Status
Not open for further replies.

abhi910

Programmer
Jul 14, 2006
9
Hi All,
I have a problem here, I want to display XML(i have the XML in a string) AS-IS in a HTML.
I mean i dont want the browser to parse it, simply show it in the collapsable-expandable format(there is nothing else i want to display except the XML content).
Any help would be appreciated.

Thanks in advance
Abhi
 

i presume you have the xml is in one continious string with no formatting and you want to show the xml in its tabbed form

if so you would need to add HTML formatting tags before/after the relivant parts of the xml string.

e.g. the first time you come accross a tag you put a break return at the end of the tag and indent to the right everything under it. when you come accross a closing tag you remove one of the indents. this will allow you to display the whole xml.

have a look on the java script forums to see if you can create the collapsable stuff there. im sure someone out there has some code you can use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top