<div dir="ltr">You can try the XsdToHaskell tool in HaXml. It might not work perfectly by itself, but with a little cleanup it'll probably save you some time.<div><br></div><div>I've also used TemplateHaskell to generate XML serializers for data declarations. If you write your own code generator, you can be as generic and customized as you need.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 30, 2016 at 3:04 AM, Johannes Waldmann <span dir="ltr"><<a href="mailto:johannes.waldmann@htwk-leipzig.de" target="_blank">johannes.waldmann@htwk-leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Cafe,<br>
<br>
I have a legacy XML schema, and some Haskell data declarations.<br>
I want to map bidirectionally between XML documents and data.<br>
<br>
I absolutely cannot change the schema. I could change the data<br>
declarations, but it would not help much, since I don't think<br>
there is any formĀ  of declaring data that would allow me<br>
to derive the transformations generically.<br>
<br>
So, I have a mess of ad-hoc transformations.<br>
What could be done about this?<br>
I think I need "generic with customization".<br>
<br>
More detail: <a href="https://github.com/jwaldmann/haskell-tpdb/issues/16" rel="noreferrer" target="_blank">https://github.com/jwaldmann/haskell-tpdb/issues/16</a><br>
<br>
Comments appreciated.<br>
<br>
- J.W.<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>