我是靠谱客的博主 哭泣路灯,这篇文章主要介绍The processing instruction target matching "[xX][mM][lL]" is not allowed,现在分享给大家,希望可以做个参考。

问题背景

今天调试eas的ws接口,发现报错“The processing instruction target matching “[xX][mM][lL]” is not allowed”

解决方案

仔细检查XML,发现String strXml = " <?xml version='1.0'开头是不允许有空格的,可能是我用sublime text列模式修改导致。

也就是说格式化为XML的String,开头不能有空格,手工修改即可,或者可以加个trim()去掉头尾的空格即可。

复制代码
1
2
3
4
5
6
7
8
String strXml = "<?xml version='1.0' encoding='utf-8' standalone='yes'?>"+ "<Request> "+ " <BillType>310</BillType> "+ " <BizType>210</BizType> "+ " <TransactionType>010</TransactionType> "+ " <SyncSystem>E3</SyncSystem> " //.....

最后

以上就是哭泣路灯最近收集整理的关于The processing instruction target matching "[xX][mM][lL]" is not allowed的全部内容,更多相关The内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部