Re: "[Fatal Error]" : 711:70: Character reference "�" is an invalid XML character
Dmitri T <[email protected]> Mon, 22 Apr 2024 08:55:12 +0200
| Newsgroups | gmane.comp.jakarta.jmeter.user |
|---|---|
| Message-ID | <PH7PR12MB7139B1C29D630DE9A0BAAAB7C0122@PH7PR12MB7139.namprd12.prod.outlook.com> |
SEVEN wrote: > Hi Support, > > We are getting the below error when we are trying to open the > script after a few days. > > "[Fatal Error]" : 711:70: Character reference "�" is an invalid > XML character > > Please refer to the attached screenshot for your reference. > Thanks in advance. > > Regards, > Sachin K > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] 1. JMeter .jmx scripts <https://cwiki.apache.org/confluence/display/JMETER/JmxTestPlan> are basically XML <https://en.wikipedia.org/wiki/XML> files 2. |�| is null character <https://en.wikipedia.org/wiki/Null_character> 3. According to Valid characters in XML <https://en.wikipedia.org/wiki/Valid_characters_in_XML> article: Note that the code point U+0000, assigned to the null control character, is the only character encoded in Unicode and ISO/IEC 10646 that is *always invalid* in any XML 1.0 and 1.1 document. So the solution would be opening the .jmx script in a text/hex editor of your choice, look for all the occurrences of the null character and delete them. It might also be the case that the null character appeared because the .jmx script was saved using one encoding <https://www.baeldung.com/java-char-encoding> and you're trying to open it in another encoding so you could try playing with the |file.encoding| system property by trying to pass various possible encodings via -D command-line argument <https://jmeter.apache.org/usermanual/get-started.html#override> or putting them to /system.properties/ file <https://www.blazemeter.com/blog/apache-jmeter-properties-customization>