On Tue, May 29, 2007 at 09:01:56PM +0100, Malcolm Wallace wrote:
> Ian Lynagh <[EMAIL PROTECTED]> writes:
>
> > We have several Haskell XML libraries, so we ought to be able to do it
> > properly
>
> There already exists an XML-aware grep-like tool, called Xtract, in
> HaXml. :-)
I wasn't CCing the author of one of the libraries for nothing :-)
> We want ideally a simple call like
> Xtract "//patch[0]/name/-"
> (reading backwards) to get the text inside any <name> element inside the
> zeroth <patch> element.
(Aside: while playing with this without any knowledge of what it meant,
I found that running
Xtract "//patch[0]/" -
gives
Xtract: Prelude.head: empty list
This is 1.13.2, so it could well be fixed already)
> Unfortunately, I think HaXml likes to preserve entities in the output of
> the text filter too. But I could add a new command-line option to
> Xtract to squash entities to the text they represent...
Sounds good to me!
Thanks
Ian
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc