Added basic to_xml logic.