I have a url with a ampersand symbol inside of a xml file that I am trying to unmarshal. I cannot change the response data I get so how can I escape it so that I can unmarshal it.
error: XML syntax error on line 2: invalid character entity &user (no semicolon)
After reading through the encoding/xml
docs I found that one can turn off strict mode which enforces the char values. In my case I know my constants that will be returned and am safe doing so. Thanks for all the responses.
This is a snippet from the docs:
In attribute values and character data, unknown or malformed character entities (sequences beginning with &) are left alone.
d.Strict = false;