Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 659
Tim Perry Avatar asked Nov 03 '22 22:11

Tim Perry


1 Answers

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.

like image 170
sclv Avatar answered Nov 08 '22 09:11

sclv