[darcs-users] XML output parsing

Jason Dagit dagit at codersbase.com
Thu Mar 13 02:54:33 UTC 2008


On Wed, Mar 12, 2008 at 7:49 PM, Jason Dagit <dagit at codersbase.com> wrote:

>
>
> On Wed, Mar 12, 2008 at 7:32 PM, Tim Docker <timd at macquarie.com.au> wrote:
>
> > Does anyone have some existing haskell code that will parse the output
> > of  "darcs changes --xml -s"? Or, for that matter another means of
> > getting the same info into haskell data structures?
> >
> > Better to re-use than re-write if possible.
>
>
> Definitely, re-use is nice.
>
> There appears to be at least 5 Haskell XML libraries:
> http://hackage.haskell.org/packages/archive/pkg-list.html#cat:XML
>
> I've used HaXml before and it met my needs.  It's especially nice if you
> have the DTD for your XML (I don't have one for darcs, sorry).  And I think
> recent versions of HaXml support ByteString (because I added rough support
> and AFAIK the maintainer accepted/improved it).
>
> I don't know of anything that is darcs specific, but if you made such a
> library on top of one of the existing XML libs and put it into hackage there
> would be much rejoicing.
>

Actually (replying to myself), it just occurred to me that in darcs's own
source code there is src/make_changelog.hs that I think does something very
similar to what you want.  I would look there and also
src/Darcs/Commands/Changes.lhs.  You might find that the haskell code you
need is part of darcs!

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20080312/56bc347e/attachment.htm 


More information about the darcs-users mailing list