Add an xpath evaluator script

Bug #701535 reported by Adrian Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libxml-libxml-perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: libxml-libxml-perl

libxml-xpath-perl supplies /usr/bin/xpath as a means to extract nodes using XPath
on the command line.

XML::XPath is very slow, so this script is too.

Patching this script to use XML::LibXML instead produces a > 10x speedup.

Very little effort is required as XML::LibXML tries hard to replicate the API of
XML::XPath

Test query run over an 8MB XML file :

/usr/bin/xpath : 30.8s real time
/usr/bin/xpath2 : 2.2s real time

Need I say more?

Enclosed my hasty port of the original script with a few comments.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :
Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.