Re: External references in xml headers
Dave Howorth <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Organization | MRC Centre for Protein Engineering |
| Message-ID | <[email protected]> |
Aristotle Pagaltzis wrote:
> The API is virtually identical.
Sadly not in the presence of namespaces :( But I'd still recommend
XML::LibXML.
my @entries = $xc->findnodes('/uniprot/entry'); # XML::XPath
becomes
my @entries = $xc->findnodes('/u:uniprot/u:entry'); # XML::LibXML
That's not too different but then the idiom changes for subsequent
searches. e.g. after:
$e = $entries[0];
my @accs = $e->findnodes('accession'); # XML::XPath
becomes
my @accs = $xc->findnodes('u:accession', $e); # XML::LibXML
Cheers, Dave
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs