I am trying to extract a value from a specific node on an xml response. On executing I am seeing error "Data at the root level is invalid. Line 1, position 1".
I understand from this Stackflow Question that the solution to this sort of problem is trim special characters however when I attempt the solution provided xmlMsg.Startswith gives a message "'XmlDocument' does not contain a definition for Startswith..."
XmlDocument xmlMsg = new XmlDocument();
xmlMsg.LoadXml(_restResponse.Content); //------------->FAILS HERE
Am I doing something wrong (clearly I am)? Is there another way to achieve what I am trying to do?
This is using VS 2022 and .net-6.