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

How to display XML in IE

Status
Not open for further replies.

parbhani

Technical User
Jul 3, 2002
125
GB
Hi all ,

I am new to XML and doing some learning stuff.

I have created a file r1.xml on my PC in C:\ as ,

<?xml version=&quot;1.0&quot; standalone=&quot;yes&quot; ?>
<?xml-stylesheet type=&quot;text/css2&quot; href=&quot;r1.css&quot; ?>
<GREETING>
Hello with XML !!
</GREETING>

Then I created a file r1.css on my PC in C:\ as ,

GREETING {display: block; font-size: 24pt; font-weight: bold;}

Lastly I opened the r1.xml file in IE 5.5, expecting that I will get my text displayed in the browser in bold . But I got the whole text of r1.xml as I have written their .

What should I do to display &quot;Hello with XML !!&quot; in bold in the browser instead of the full text of the XML file .

Please help .
 
CSS (Cascading Style Sheet) is not the same thing as XSL (XML Style Sheet)

-pete
 
U will need to make an xsl file containing something like:


<xsl:stylesheet xmlns:xsl=&quot;
<xsl:template match=&quot;/&quot;>
<div class=&quot;GREETING&quot;><xsl:value-of select=&quot;GREETING&quot;/></div>
</xsl:template>

and change the xml header to include the style sheet

<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;example Style Sheet.xsl&quot;?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top