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

XML page displays raw code in browser 4

Status
Not open for further replies.

Terpsfan

Programmer
Dec 8, 2000
954
US
I've created some xml pages and inserted them in my folder, however they come up as raw code in the browser. I was under the impression that IE5 supported XML. Please let me know what I'm doing wrong. Apparently the server isn't processing the xml code. Thanks
 
Hi there,

Raw code huh? I know what you mean. XML will not be display like that. You have to parse that with a parser blahblahblah etc.

What you need to do is make a sheet. You can choose CSS or XSL. You're lucky because IE5 supports XSL. If you're doing well you have:

<?xml version=&quot;1.0&quot; ?>
<yourtag>info</yourtag>


But you have to chage it into:

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot; ?>
<?xml-stylesheet type=&quot;text/css&quot; href=&quot;stylesheet.css&quot; ?>
<yourtag>info</yourtag>


Your stylesheet.css has the tags like
.yourtag {color: green}

Or you can use XSL:

<?xml version=&quot;1.0&quot; standalone=&quot;yes&quot; ?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;stylesheet.xsl&quot;?>
<yourtag>info</yourtag>


Your stylesheet.xsl looks like this:

<?xml version=&quot;1.0&quot; ?>
<xsl:stylesheet xmlns:xsl=&quot;
<xsl:template match=&quot;/&quot;>
<html><h1>
<xsl:value-of select=&quot;yourtag&quot;/>
</h1></html>
</xsl:template>


If you want to know more, I would say: Read a tutorial!

I hope I have answered your question and I appriciate if I would be rated:

the 17-yaer old Developer man :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top