Created
August 31, 2009 03:47
-
-
Save lopnor/178272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Test::More; | |
use Data::Dumper; | |
#sub XML::LibXML::bootstrap{ die } | |
BEGIN { | |
unshift @INC, sub {die if $_[0] eq 'XML::LibXML'; return}; | |
} | |
use XML::Atom::Entry; | |
my $xml = <<END; | |
<?xml version='1.0' encoding='utf-8'?> | |
<entry xmlns='http://www.w3c.org/2005/Atom' | |
xmlns:gd='http://schemas.google.com/g/2005' | |
gd:etag='"hoge"'> | |
</entry> | |
END | |
{ | |
my $atom = XML::Atom::Entry->new(\$xml); | |
isa_ok $atom->elem, 'XML::XPath::Node::Element'; | |
# my $etag = $atom->elem->getAttributeNS('http://schemas.google.com/g/2005', 'etag'); | |
my $etag = $atom->elem->getAttribute('gd:etag'); | |
is $etag, '"hoge"'; | |
} | |
done_testing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment