Oracle 10g で名前空間を持つタグの値を抽出しようとしています。私のクエリは
select extract(xmltype(xml_text),
'/feed/entry[1]/yt:statistics',
'xmlns:yt="http://gdata.youtube.com/schemas/2007"') title
from edgecast_xml
where load_date > sysdate-1
そしてそれはnullを返します
元の xml は次のとおりです (リンクを避けるために、http ではなく htp とラベル付けする必要がありました)。
<feed xmlns='htp://www.w3.org/2005/Atom' xmlns:media='htp://search.yahoo.com/mrss/' xmlns:openSearch='htp://a9.com/-/spec/opensearch/1.1/' xmlns:gd='htp://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/"D0YEQH88eSp7I2A9XRZQEU8."'>
<entry gd:etag='W/"CUMNRH47eCp7I2A9XRZRGUo."'>
<id>tag:youtube.com,2008:video:qXPtXPJLnJY</id>
<updated>2014-06-17T02:51:35.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Nonprofit' label='Nonprofits & Activism'/>
<title>Rear Admiral Lee Addresses Restrictive Regulations on Religious Liberty</title>
<gd:rating average='4.8343196' max='5' min='1' numRaters='5239' rel='http://schemas.google.com/g/2005#overall'/>
<yt:statistics favoriteCount='0' viewCount='365565'/>
<yt:rating numDislikes='217' numLikes='5022'/>
</entry>
</feed>
null になるのはなぜですか? /feed/entry[1] だけを選択すると、entry タグ内のすべてに対して xml が返されます。