Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Using XSLT to extract value of a XML node with namespace

$
0
0

I have a XML source code here.

<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:job="http://www.pageuppeople.com">
  <channel>
    <title>SMH Jobs</title>
    <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
    <description>A listing of jobs available here</description>
    <item>
      <title>eCommerce Optimisation Advisor</title>
      <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
      <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
    </item>
  </channel>
</rss>


I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.

<xsl:value-of select="job:location" disable-output-escaping="yes"/>
<xsl:value-of select="job/location" disable-output-escaping="yes"/>
<xsl:value-of select="job\location" disable-output-escaping="yes"/>
<xsl:value-of select="location" disable-output-escaping="yes"/>


This might be an easy question for you, but I would appreciate if anyone can help.



Viewing all articles
Browse latest Browse all 11508

Trending Articles