Solutions to error reporting after adding comments to XML files

It took a long time to find the most useful way to feel
set the <?xml version=”1.0″ encoding=”UTF-8″ ?>
change to <?xml version=”1.0″ encoding=”UTF8″ ?>
that is to say, remove –
during the process, I searched a lot of methods on the Internet. If the above methods don’t work, I can try the following two methods:
1. Add configuration in pom.xml file

<properties>
       <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

2. Change the idea configuration


note: it is only during the process of finding that the XML annotation format is

<!-- Contents --> Right
<! --content --> wrong
To be separated by two spaces, but I do not think it has much impact, after changing the format still does not support comments


Read More: