You need an output element with the method set to xml:
This should be the first element under the document element.
Because you have html as your outer result element the transformer thinks you want html. This is according to the spec.
Joe (MVP - xml)