有人能帮我拿一下吗?
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>This is a test</title>
<link>http://somelink.html</link>
<description>RSS Feed</description>
<item>
<title>This is a title</title>
<link>http://somelink.html</link>
<description><div style='font-size: 9px;'><div class="rendering rendering_researchoutput rendering_researchoutput_short rendering_contributiontojournal rendering_short rendering_contributiontojournal_short"><h2 class="title"><a class="link" rel="ContributionToJournal" href="http://somelink.html"><span>This is a Title</span></a></h2><a class="link person" rel="Person" href="somelink.html"><span>Bob, C. R</span></a> &amp; Smith, W. <span class="date">2014</span> <span class="journal">In : <a class="link" rel="Journal" href="http://somelink.html"><span>Publishers title</span></a>.</span><p class="type"><span class="type_family">Research output<span class="type_family_sep">: </span></span><span class="type_classification_parent">Contribution to journal<span class="type_parent_sep"> › </span></span><span class="type_classification">Article</span></p></div><div class="rendering rendering_researchoutput rendering_researchoutput_detailsportal rendering_contributiontojournal rendering_detailsportal rendering_contributiontojournal_detailsportal"><div class="article"><table class="properties"><tbody><tr class="language"><th>Original language</th><td>English</td></tr><tr><th>Journal</th><td><a class="link" rel="Journal" href="http://somelink.html"><span>Journal of Human Rights and the Environment </span></a></td></tr><tr><th>Journal publication date</th><td>2014</td></tr><tr class="status"><th>State</th><td>In press</td></tr></tbody></table></div></div></div></description>
<pubDate>Wed, 02 Apr 2014 15:59:41 GMT</pubDate>
<guid>http://somelink.html</guid>
<dc:date>2014-04-02T15:59:41Z</dc:date>
</item>
</channel>
</rss>
并告诉我如何使用XSLT解析<description>
标记以返回<span class="...">
字段或<div class='...'>
字段的内容?
我在xslt中尝试了以下操作:
<xsl:value-of select="span[@class='date']"/>
不返回任何值
这里有一种笨拙的方法来提取<span class="date">
元素的内容(或者更确切地说,在禁用转义后<span class="date">
元素是什么):
<xsl:value-of select="substring-before(substring-after(description, '<span class="date">'), '</span>')"/>