Repository navigation
new feature: adding support for creating XML with the Hiccup syntax #24
DavidVujic
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
It is now possible to use the
python-hiccuplibrary to create XML documents in the same concise and programmatic way as for creating HTML. Both share a lot of rules, but the specs differ for some things.That is why I have added the
python_hiccup.xmlnamespace with the same API as for the existinghtml:But why? There is already the
etreepackage availableYes, and that one is great! The hiccup syntax opens up for a more concise and flexible style of coding by using basic Python data structures instead of constructing an object hiearchy.
A simple example
Using
etree:Using
python_hiccup:The ouput from both is:
I hope this addition will be useful for Python teams out there!
All reactions