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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get Internet Explorer to display XML pages, and not the code?

Status
Not open for further replies.

usalabs3

Technical User
Sep 7, 2004
152
US
I'm trying to run an internet radio station, but the output of the station's status is in XML, EG :-

Code:
- <Schedule System="Jazler">
- <Event status="happening" startTime="21:21:25" eventType="idle">
  <Announcement Display="Sorry, service not available. Try again later." /> 
- <Song title="Sorry, service not available. Try again later.">
- <Artist name="">
  <Media runTime="" /> 
  <Expire Time="" /> 
  <TrackID AUID="313" /> 
  </Artist>
  </Song>
  </Event>
  </Schedule>

the file name is xmlsongs.xml, but when I enter [domain].[ext]/[stationname]/xmlsongs.xml I get the code above displayed.
 
The reasoning for this is that XML doesn't do anything besides organize data. As you can see from the code you posted above, there is nothing that tells Internet Explorer how to display the data.

If you want to format the XML data you can use XSL (Extensible Stylesheet Language) or a host of other methods (e.g., JavaScript). In this case, you link your XML file to the XSL sheet.

Here is a primer on how to link the XML file:
Here is a primer on how to properly make an XSL:

An easier but less manipulatiable (and unrecommended by W3C) formatting option is to simply use CSS and link it to your XML file:




Ryan ;-]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top