mat21 has asked for the wisdom of the Perl Monks concerning the following question:
there is no match although many entry tags are in the xml file (same behaviour for any tag).my $reader = new XML::LibXML::Reader(location => $xmlfile) or die "can +not read $xmlfile\n"; while ($reader->read) { my $pattern = XML::LibXML::Pattern->new('//entry'); $reader ->nextPatternMatch($pattern); }
if I replace it by only <uniprot> all my xpath queries work. I guess I have to do something to declare the schema, but the tags do not have any prefix like examples in the documentation<uniprot xmlns="http://uniprot.org/uniprot" xmlns:xsi="http://www.w3.o +rg/2001/XMLSchema-instance" xsi:schemaLocation="http://uniprot.org/un +iprot http://www.uniprot.org/support/docs/uniprot.xsd">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::LibXML::Reader and XPATH
by dHarry (Abbot) on Feb 20, 2009 at 11:06 UTC | |
by mat21 (Beadle) on Feb 20, 2009 at 15:12 UTC | |
by dHarry (Abbot) on Feb 20, 2009 at 16:12 UTC |