[Haskell-beginners] Is there an aeson-like XML serialization library?
Thomas Koster
tkoster at gmail.com
Tue Mar 31 03:26:53 UTC 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150331/81e749c7/attachment.html>
More information about the Beginners
mailing list