summaryrefslogtreecommitdiff
path: root/t/22name_select.t
diff options
context:
space:
mode:
Diffstat (limited to 't/22name_select.t')
-rw-r--r--t/22name_select.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/22name_select.t b/t/22name_select.t
new file mode 100644
index 0000000..5977540
--- /dev/null
+++ b/t/22name_select.t
@@ -0,0 +1,23 @@
+use Test;
+BEGIN { plan tests => 4 }
+
+use XML::XPath;
+ok(1);
+
+my $xp = XML::XPath->new(ioref => *DATA);
+ok($xp);
+
+my @nodes;
+@nodes = $xp->findnodes('//*[name() = /AAA/SELECT]');
+ok(@nodes, 2);
+ok($nodes[0]->getName, "BBB");
+
+__DATA__
+<AAA>
+<SELECT>BBB</SELECT>
+<BBB/>
+<CCC/>
+<DDD>
+<BBB/>
+</DDD>
+</AAA>