Over the last few days I have been trying to work out how to bring a World of Warcraft armory feed into my site but without success. I'm not sure if it is because the format is wrong or I am doing it wrong, but I am unable to pull any information from the nodes. Running the same code (with changed node names) on other RSS feeds seems to work, can anyone tell me why I can't pull information from nodes from this feed.
As soon as I post up an this request I manage to find the reason and a solution. Why couldn't I have found this with all the searching I had done earlier.
GetXmlDocumentByUrl help
Over the last few days I have been trying to work out how to bring a World of Warcraft armory feed into my site but without success. I'm not sure if it is because the format is wrong or I am doing it wrong, but I am unable to pull any information from the nodes. Running the same code (with changed node names) on other RSS feeds seems to work, can anyone tell me why I can't pull information from nodes from this feed.
An example feed can be viewed here:
http://www.wowarmory.com/character-feed.atom?r=Dreadmaul&cn=Crunchballs&locale=en_US
My XSLT is here:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:for-each select="$currentPage/ancestor-or-self::root//node [@nodeTypeAlias='Feed Item']">
<xsl:variable name="url" select="string(data[@alias='url'])" />
<!-- Is the url populated? -->
<xsl:if test="string-length($url) > 0">
<xsl:variable name="feedContent" select="umbraco.library:GetXmlDocumentByUrl( $url )"/>
<xsl:value-of select="$feedContent/feed/author/name"/>
<xsl:for-each select="exsl:node-set($feedContent)//entry">
<xsl:value-of select="title"/>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
As soon as I post up an this request I manage to find the reason and a solution. Why couldn't I have found this with all the searching I had done earlier.
http://our.umbraco.org/forum/developers/xslt/8016-getXMLDocument-won't-display-any-content
is working on a reply...