Is there a tool to generate XML picklers in Haskell from an XSD?

只谈情不闲聊 提交于 2019-12-07 05:15:26

问题


I'd like to generate XML picklers for an XSD file. It seems like a useful tool that might already exist. Does it?


回答1:


HaXml does have a tool for generating Haskell data types from DTDs and a tool for generating Haskell data types from XSDs: http://hackage.haskell.org/package/HaXml

The executables are named XsdToHaskell and DtdToHaskell.

If you're on Windows and you have PATH modified by Haskell Platform, you'll need to call it like this: xsdtohaskell < path_to.xsd > path_to.hs

The generated files are a decent starting point.



来源:https://stackoverflow.com/questions/11022758/is-there-a-tool-to-generate-xml-picklers-in-haskell-from-an-xsd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!