问题
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