Re: querying multiple params

Petr Pajas <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
2009/7/24 Maurice Mengel <[email protected]>:
> Hi List,
>
> i don't know where to look anymore. Hope you know more
>
> With libxml, i try to pass this query and I get no results:
>
>         my $xpath ="//mpx:sammlungsobjekt[mpx:andereNr[\@art = 'ID' and . =
> '$id'] and mpx:andereNr[\@art ='DAT-Nr.' and . = '$tape_no']]";
>         my @nodes = $root->findnodes($xpath);
>
>
> I try the same query in oXygen (xpath1) and I get the results that I am
> looking for.
>
> Any suggestions for me?

Yes, read this:

http://perl-xml.sourceforge.net/faq/#namespaces_xpath

or read carefully the documentation on the findnodes method at

http://search.cpan.org/dist/XML-LibXML/lib/XML/LibXML/Node.pod

(pay special attention to the NOTE ON NAMESPACES AND XPATH)

-- Petr
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.