爆出的错误:
org.dom4j.DocumentExceptionError on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
代码:
JLGetVehicleInfo.Query(strinformation),
其中 strinformation 是一个字符串如下:
<RequestForm>
<UserID>10009</UserID>
<UserPassWord>zhx2014</UserPassWord>
<RequestItem>1</RequestItem>
<RequestData>
<LicensePlate>测S22333</LicensePlate >
<LicenseColor>2</LicenseColor>
</RequestData>
</RequestForm>
以前出现过这种情况,是因为格式不对,xml格式中前面部分插入了乱七八糟的文字。你可以再确认下.