1use Test;
2BEGIN { plan tests => 5 }
3
4use XML::XPath;
5
6#$XML::XPath::Debug = 1;
7#$XML::XPath::SafeMode = 1;
8
9my $xp = XML::XPath->new(ioref => *DATA);
10ok($xp);
11
12my $nodeset = $xp->find('/rdf:RDF/channel//@rdf:*');
13ok($nodeset);
14
15ok($nodeset->size);
16
17ok(4);
18ok(5);
19
20__DATA__
21<?xml version="1.0"?>
22<rdf:RDF 
23  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
24  xmlns="http://purl.org/rss/1.0/"
25> 
26
27  <channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0">
28    <title>Meerkat</title>
29    <link>http://meerkat.oreillynet.com</link>
30    <description>Meerkat: An Open Wire Service</description>
31  </channel>
32
33  <image
34rdf:about="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg">
35    <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" />
36    <title>Meerkat Powered!</title>
37    <url>http://meerkat.oreillynet.com/icons/meerkat-powered.jpg</url>
38    <link>http://meerkat.oreillynet.com</link>
39  </image>
40
41  <item rdf:about="http://c.moreover.com/click/here.pl?r123" position="1">
42    <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" />
43    <title>XML: A Disruptive Technology</title> 
44    <link>http://c.moreover.com/click/here.pl?r123</link>
45    <description>
46      XML is placing increasingly heavy loads on the existing technical
47      infrastructure of the Internet.
48    </description>
49  </item> 
50
51  <textinput rdf:about="http://search.xml.com">
52    <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" />
53    <title>Search XML.com</title>
54    <description>Search XML.com's XML collection</description>
55    <name>s</name>
56    <link>http://search.xml.com</link>
57  </textinput>
58
59</rdf:RDF>
60