diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2003-01-26 19:35:03 +0000 |
---|---|---|
committer | <> | 2015-02-23 10:18:26 +0000 |
commit | a2d12bc84fb2af87dd1c0c6e5bc854554902cd67 (patch) | |
tree | 7665979c7c281b21971de576d93246a022bff649 /t/rdf.t | |
download | perl-xml-xpath-master.tar.gz |
Imported from /home/lorry/working-area/delta_perl-xml-xpath/XML-XPath-1.13.tar.gz.HEADXML-XPath-1.13master
Diffstat (limited to 't/rdf.t')
-rw-r--r-- | t/rdf.t | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -0,0 +1,59 @@ +use Test; +BEGIN { plan tests => 5 } + +use XML::XPath; + +#$XML::XPath::Debug = 1; +#$XML::XPath::SafeMode = 1; + +my $xp = XML::XPath->new(ioref => *DATA); +ok($xp); + +my $nodeset = $xp->find('/rdf:RDF/channel//@rdf:*'); +ok($nodeset); + +ok($nodeset->size); + +ok(4); +ok(5); + +__DATA__ +<?xml version="1.0"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://purl.org/rss/1.0/" +> + + <channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0"> + <title>Meerkat</title> + <link>http://meerkat.oreillynet.com</link> + <description>Meerkat: An Open Wire Service</description> + </channel> + + <image +rdf:about="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg"> + <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" /> + <title>Meerkat Powered!</title> + <url>http://meerkat.oreillynet.com/icons/meerkat-powered.jpg</url> + <link>http://meerkat.oreillynet.com</link> + </image> + + <item rdf:about="http://c.moreover.com/click/here.pl?r123" position="1"> + <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" /> + <title>XML: A Disruptive Technology</title> + <link>http://c.moreover.com/click/here.pl?r123</link> + <description> + XML is placing increasingly heavy loads on the existing technical + infrastructure of the Internet. + </description> + </item> + + <textinput rdf:about="http://search.xml.com"> + <inchannel rdf:resource="http://meerkat.oreillynet.com/?_fl=rss1.0" /> + <title>Search XML.com</title> + <description>Search XML.com's XML collection</description> + <name>s</name> + <link>http://search.xml.com</link> + </textinput> + +</rdf:RDF> |