XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 17th, 2003, 01:33 PM
Decawi Decawi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 Decawi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old June 17th, 2003, 01:52 PM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 8
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.

Reply With Quote
  #3  
Old June 17th, 2003, 02:19 PM
Decawi Decawi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 Decawi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Help - Display XML in an HTML file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway