But when I run it, this gives me the error;
Cannot parse XML: The processing instruction target matching “[xX][mM][lL]” is not allowed.
This coding works when I remove the comment <?xml version = "" encoding = ""?>.
I cant output the file because the error occurs on the first line.
Doesn’t the way you suggest remove the comment line from the xml.
I need the xml to have the format I specified.
How does having two separate variables achieve this?