The HTML specification does not explicitly require a specific return type for parseFromString(), but according to Web Platform TestsDOMParser-parseFromString.html, the expected return value for XML MIME types is a Document—not an XMLDocument.