我是靠谱客的博主 灵巧荷花,这篇文章主要介绍【转】XML: The processing instruction target matching "[xX][mM][lL]" is not allowed...解决方案,现在分享给大家,希望可以做个参考。

转载于:http://blog.163.com/lgh_2002/blog/static/44017526201281853636893/


现象:


ERROR  - Error on line 2 of document  : The processing instruction target matching "[xX][mM][lL]" is not allowed. Nested exception: The processing instruction target matching "[xX][mM][lL]" is not allowed.

异常解释:xml文件不能被解析,一般出现这样的问题在于xml格式上,并且问题多出现在xml文件的头部。

原因:一般多是因为xml文件头部有了空格或回车导致的

总结:<?xml version="1.0" encoding="UTF-8"?>前面不要有任何其他字符,如空格、回车、换行这些否则就会出现上面的异常。


还有一种情况是:<?xml version="1.0" encoding="UTF-8"?>放在代码文件最前面

最后

以上就是灵巧荷花最近收集整理的关于【转】XML: The processing instruction target matching "[xX][mM][lL]" is not allowed...解决方案的全部内容,更多相关【转】XML:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(53)

评论列表共有 0 条评论

立即
投稿
返回
顶部