kennyaidan
Programmer
Hi,
I'm a beginner aspx programmer and i am about to start learning aspx and some simple xml. I was wondering what were the apprioate steps in creating aspx files using xml.
Would you start with a simple xml file similar to the following
epo.xml
<episodes>
<episode series="TNG" season="7">
<name>All Good Things</name>
<desc>The final episode of TNG.</desc>
</episode>
</episodes>
A xsl file like the following
epo.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.1" xmlns:xsl="<xslutput method="html" indent="yes" />
<xsl:template match="/">
<font face="Verdana" size="2">
<ul>
<xsl:for-each select="episodes/episode">
<p />
Series:<b><i> <xsl:value-of select="@series" /></i></b><br />
Season:<b> <xsl:value-of select="@season" /></b><br />
<li>
<b><xsl:value-of select="name"/></b>
</li>
<br />
<xsl:value-of select="desc"/>
</xsl:for-each>
</ul>
</font>
</xsl:template>
</xsl:stylesheet>
And then simple bring the two together using this asp.net file epo.aspx
<asp:xml runat="server" DocumentSource="epo.xml" TransformSource="epo.xsl" />
I got this code from the following website
and i am wondering whether this is the normal way to create aspx files using xml. I want to get the steps and technique right before i move on. Can anyone suggest other tutorials that may be of benefit
thanks
aidan
I'm a beginner aspx programmer and i am about to start learning aspx and some simple xml. I was wondering what were the apprioate steps in creating aspx files using xml.
Would you start with a simple xml file similar to the following
epo.xml
<episodes>
<episode series="TNG" season="7">
<name>All Good Things</name>
<desc>The final episode of TNG.</desc>
</episode>
</episodes>
A xsl file like the following
epo.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.1" xmlns:xsl="<xslutput method="html" indent="yes" />
<xsl:template match="/">
<font face="Verdana" size="2">
<ul>
<xsl:for-each select="episodes/episode">
<p />
Series:<b><i> <xsl:value-of select="@series" /></i></b><br />
Season:<b> <xsl:value-of select="@season" /></b><br />
<li>
<b><xsl:value-of select="name"/></b>
</li>
<br />
<xsl:value-of select="desc"/>
</xsl:for-each>
</ul>
</font>
</xsl:template>
</xsl:stylesheet>
And then simple bring the two together using this asp.net file epo.aspx
<asp:xml runat="server" DocumentSource="epo.xml" TransformSource="epo.xsl" />
I got this code from the following website
and i am wondering whether this is the normal way to create aspx files using xml. I want to get the steps and technique right before i move on. Can anyone suggest other tutorials that may be of benefit
thanks
aidan