[Haskell-beginners] Is there an aeson-like XML serialization library?

Michael Snoyman michael at snoyman.com
Tue Mar 31 05:39:28 UTC 2015


It doesn't have the typeclass stuff built in, but xml-conduit has proper
support for XML namespaces.

On Tue, Mar 31, 2015, 6:27 AM Thomas Koster <tkoster at gmail.com> wrote:

> Hi list,
>
> I want to write a simple XML web service in Haskell that services a .NET
> WCF client, but am struggling with choosing the right XML library.
>
> "aeson" [1] has been a pleasure to use, so I am looking for an XML
> serialization library similar to aeson, where I can write
> ToElement/FromElement instances using simple applicative combinators,
> working with a high-level document model (i.e. not a parse tree), just like
> I have done in the past with ToJSON/FromJSON.
>
> Does such a library exist?
>
> I need the library to understand XML namespaces and the mandatory
> predefined entities, but I do not need any other extensions like XML
> Schemas, XPath or XSLT. Preferably, "xmlns" attributes should be handled
> specially and namespace prefixes resolved by the parser. "xmlns" attributes
> should be placed automatically by the renderer (I don't care what prefixes
> it chooses). I do not want to have to keep track of seen namespace prefixes
> while I am traversing the document, or to manually place "xmlns" attributes
> on elements for rendering. The "xml" [2] library is giving me grief at the
> moment with how unspecial its treatment of namespaces is.
>
> HXT appears to be beyond my skill level at the moment. There appear to be
> too many new things I would have to learn all at once before I could use it
> for this simple task. Cf. aeson, which I was able to use for practical
> applications the day I learned what an applicative functor was.
>
> [1] https://hackage.haskell.org/package/aeson
> [2] https://hackage.haskell.org/package/xml
>
> Thanks,
> --
> Thomas Koster
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150331/0952887c/attachment.html>


More information about the Beginners mailing list