I'm curious, what exactly in the DOM is not XML-compatible?
From long-lost memory, I think it's implicitly closed tags (e.g. img).
XML can handle implicitly closed tags, they call them "empty" in the spec here:
https://www.w3.org/TR/xml/#sec-starttags