Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs

问题描述:


当SoapUI访问一个webservice时,对于某些webserive服务,如果webserive的输入参数要求是xml格式,如果xml格式输入不正确,会报“Unmarshalling Error: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs. at [row,col {unkNown-source}]: [9,14]”的错误信息。


虽然输入参数已经符合xml的标准格式,但是由于转义符号的原因,所以出现了这样的错误

因此,在输入xml格式的参数时,首先需要添加<?xml version="1.0" encoding="UTF-8"?>(注意:这一行必须出现在第一行,并且需要顶格,前面没有任何空格或其他字符),使得输入参数符合xml标准;其次对于转义字符,需要进行改变。

在这里,列举出常用的一些转义字符:


特殊符号

代码

<

&lt;

>

&gt;

"

&quot;

&amp;

版权标志

&copy;

商标标志

&reg;

空格

&nbsp;

.

&#8226

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念