Bearable XML Schema with Clojure
Writing XML schemas by hand is rough, so I wrote an extension to Stuart Sierra’s prxml library that makes writing XML schemas slightly more bearable.
For instance, while working on Streamigator I needed to validate the following:
With XML, I would have written this schema:
With Bearable, the above schema was shortened to:
As you can see, the Clojure code matches up much closer to the document I needed to validate. Intrigued? You can view the code and up-to-date documentation at Bearable’s GitHub repository.
If you think Bearable could be improved let me know in the comments or through email!