|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using a mixture of PHP & Javascript, Is there any examples where I can format XML?
Basically I am getting an XML Query as 1 long line, eg: <?xml version="1.0" ?><message id="list"><id>547</id><locationid>6877</locationid></message> So i want to take this, and then have it outputted as : <?xml version="1.0" ?> <message id="list"> <id>547</id> <locationid>6877</locationid> </message> (with tabs, as the post gets rid of them) It is going to be displayed in IE, i have tried using Iframes and using IE inbuild XML parser, but it isn't working. So I just want to use a function that i can just output the formatted XML in a <PRE> text Thanks in advance. |
|
#2
|
|||
|
|||
|
Well i found a solution...
just create a php file which will just display the XML in that file header( "Content-type: text/xml" ); then display my XML code then in IE create IFRAMES and it all works |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Formatting XML query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|