Serialize XML

Serializes to XML. Infrastructure to support other serializations.