I'm a new user so I don't quite know the flow of the programming yet but couldn't you stream the XML through a function that replaces the the < and > with the HTML equivilants < and > and then place the whole thing between <pre> tags?
I guess to format the XML 'nicely' you could make the function add a carriage return after each opening tag along with a tab, the next opening tag would get a carriage return along with two tabs (say tabAmount + 1), etc. Each closing tag would get a carriage return and remove a tab (tabAmount - 1) Does this help? Matt ----- Original Message ----- From: Pugh, Eric <[EMAIL PROTECTED]> To: 'Turbine Users List' <[EMAIL PROTECTED]> Sent: Wednesday, January 02, 2002 10:56 PM Subject: How to output XML as HTML nicely.. > Hi all, > > I have a .vm file that I want to output some XML on the page in a table of > other data. Obviously, if I output my raw XML, it doesn't show up, because > of the < and > tags... What have people done to output XML nicely? I would > love it if I could take my very compact machine readable XML with no returns > or spaces, and convert it to nice pretty XML with returns and > indentations... > > Slapping the XML in a textarea is a plain, ugly, but workable method, I am > looking for something better! > > Eric > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
