Converts to using #as_xml methods to assemble sanitized XML.