Factor xml source into its own file
Add tests for auto-detecting xml/html documents
Implement auto-switching to xml based on header