关于解决 The processing instruction target matching "[xX][mM][lL]" is not allowed

在处理和保存XML文件时,出现The processing instruction target matching "[xX][mM][lL]" is not allowed 错误,也就是你的xml配置文件格式错误。所以,要自己检查一下格式,这个在网上是搜不到的。

最容易疏忽的错误就是,用eclipse的快捷键Ctrl+Shift+/添加注释后,在手动删除时,没有删除最开始的一句

<?xml version="1.0" encoding="UTF-8"?>前面的空格什么的就会报错,还不容易发现。

因为<?xml version="1.0" encoding="UTF-8"?>这行前面必须是置顶的,前面不允许有任何空格

原文地址:https://www.cnblogs.com/wytings/p/4116062.html