I did a similar thing in the past.
I fixed it fist by parsing the XML retrieved from connect into JSON using xml2js library
const parser = new xml2js.Parser();
const message = await parser.parseStringPromise(xml);
The fields that you add to a DocuSign document are included deep into the json structure
const tabStatus = message.DocuSignEnvelopeInformation....
A closer look at the XML file makes the problem apparent:
There is an empty line / blank space before the XML prolog. Clearing out everything before the <xml version... resolved the somewhat cryptic error message.
You can use single quotes around your XML, so:
set @xml = '<root><listing bedrooms="3" bathrooms="2.0" /><listing bedrooms="" bathrooms=""/></root>'
Or you can use use two double-quotes, so:
set @xml = "<root><listing bedrooms=""3"" bathrooms=""2.0&...
You didn't specify details of exactly how you retrieved and deployed the file. But it sounds like you retrieved with a newer API version (itemInstances was introduced in API 49) and deployed with an older API version (46.0). This would definitely cause an error.