|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help - Display XML in an HTML file
Hello,
What I'm trying to do is to display xml information in an IFRAME in an HTML document. When I do this: <IFRAME SRC="test.xml" WIDTH="78%" HEIGHT="300"></IFRAME> The xml information displays perfectly in the frame. Just like you opened a .xml file in a browser. But when I do this: <IFRAME SRC="xmliframe.asp?CDHIC_ID=<%=vCDIHC_ID%>&xmlview=XML_SENT" WIDTH="78%" HEIGHT="300"></IFRAME> Where the .asp file looks in a database to retrieves the XML and does a response.write with the field. What I get displayed in the IFRAME is just the data between the elements. Like you opened a .html file with XML in it. Does anyone have any ideas? Thanks in Advance, Dean |
|
#2
|
|||
|
|||
|
Sounds to me like a header problem. I'm not familiar with asp, but the engine is probably outputting a (default) content-type response of text/html, so the browser tries to read the document as such. You likely need to set it to text/xml or something like that...
This is assuming your asp script is actually outputting the xml properly in the first place. |
|
#3
|
|||
|
|||
|
Ya, it is outputting proper XML.. and you are correct, the asp is just ouputting HTML, and "yes" it probably is just using the default content type.
Now... pardon, my ignorance, but my HTLM is weak.. and I never mess with the header. Can anyone give me an example. Also.. an actual example. URL is the xml and in the format that I want to see, even if the document has an .html extension But... with the .html extension.. it looks like this... URL These two files are identical, but the browser processes them differently. I want to force the XML format in the HTML file. Thanks Dean |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Help - Display XML in an HTML file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|