Macromedia DesDev XML Feed

More information about the Macromeia DesDev XML Feed can be found here. As you can see, I've incorporated it into my site in the left-hand navigation bar. Here's how you can do it. You'll need to have your site hosted on a Win2k box with MSXML 3.0 parser installed. First create xmlfeed.asp with the following code:

<%
set xslt = createObject("MSXML2.XSLTemplate")
set xslDoc = createObject("MSXML2.FreeThreadedDOMDocument")
set xmlDoc = createObject("MSXML2.DOMDocument")

xmlDoc.async = False
xmlDoc.setProperty "ServerHTTPRequest", true
xmlDoc.load("http://www.macromedia.com/desdev/resources/macromedia_resources.xml")

xslDoc.async = False
xslDoc.Load Server.MapPath("xmlfeed.xsl")
Set xslt.stylesheet = xslDoc
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
xslProc.Transform
response.write xslProc.output
%>

Next, you'll need to create an XSL file to transform the XML. Save the code below as xmlfeed.xsl

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:key name="type-key" match="macromedia_resources/resource[product/@name='Dreamweaver_UltraDev']" use="@type"/>
<xsl:template match="/">
<xsl:variable name="unique-types"
select="macromedia_resources/resource[generate-id(.)=generate-id(key('type-key',@type))]/@type"/>
<div id="mmdesdev" style="position:absolute; left:17px; top:250px; width:142px; z-index:3;">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="maintext" align="center"><b>Macromedia Developer Resources for Ultradev</b>
</td>
</tr>
<tr>
<td><img src="images/spacer.gif" height="10" />
</td>
</tr>
<xsl:for-each select="$unique-types">
<tr>
<td class="menheadi" align="center"><xsl:value-of select="." />s
</td>
</tr>
<tr>
<td><img src="images/spacer.gif" height="10" />
</td>
</tr>
<xsl:for-each select="key('type-key', .)">
<tr>
<td class="maintext"><a href="{url}" target="_blank"><xsl:value-of select="title" /></a>
</td>
</tr>
<tr>
<td><img src="images/spacer.gif" height="10" />
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</div>
</xsl:template>
</xsl:stylesheet>

You can alter the HTML to fit in with your site design. Then you can use the follow line of code to put the feed on your page(s):

<!--#include file="xmlfeed.asp" -->

AddThis Social Bookmark Button

Related Links

Extensions About me Articles Downloads Portfolio

Products

Charon Cart 3 Extension Charon Cart.NET v2 Multi-lingual Application Charon Cart 2 Extension