Add XML rendering

Adds functionality requested in #25.