[Edinburgh-pm] XML module recommendations

Miles Gould miles at assyrian.org.uk
Mon Jun 6 10:17:28 PDT 2011

Hi everyone,

I've got an XML file, of which the following is a fragment:

<patch author='mg at maths.gla.ac.uk' date='20100205002131'
local_date='Fri Feb  5 00:21:31 GMT 2010' inverted='False'
	<name>Changed style to report; narrowed some diagrams.</name>
	<comment>Ignore-this: eeb8c9a84599ecef486fd7d5aa7c3f9e</comment>
<patch author='mg at maths.gla.ac.uk' date='20090220012304'
local_date='Fri Feb 20 01:23:04 GMT 2009' inverted='False'
	<name>Post-viva corrections</name>
<patch author='mg at maths.gla.ac.uk' date='20090125173648'
local_date='Sun Jan 25 17:36:48 GMT 2009' inverted='False'
	<name>Some refactorings, and a couple of minor fixes. This was the
submitted version.</name>
<patch author='mg at maths.gla.ac.uk' date='20080922221150'
local_date='Mon Sep 22 23:11:50 BST 2008' inverted='False'
	<name>Finished proofreading!</name>
<patch author='mg at maths.gla.ac.uk' date='20080922160237'
local_date='Mon Sep 22 17:02:37 BST 2008' inverted='False'
	<name>No more jokes :-(</name>

I'd like to extract a list of all the hashes: ie, the content of every
attribute matching the XPath /changelog/patch/@hash. What's the best
CPAN module for that sort of thing?

[I know what you're thinking: why don't you build darcs as a set of
libraries and write a Haskell program that links against libdarcs and
queries the data-structures directly? The question answers itself, I


More information about the Edinburgh-pm mailing list