fix Xml() logic

Found this error when adding special handling of json list docs.