1、jaxen.jar包不可少,开始因为这个头大了很久。
2、xml文件中如果遇到& 记得用&代替,不然解析的时候会报错。如下:
<property name="url" value="http://serverIp/System.info?version=1.0& action=login& userName=[userName]& password=[password]"/>
注意红色字体,比如userName前面的&不用&代替的话就会报这么一个错误:
Nested exception: org.xml.sax.SAXParseException: The reference to entity "userName" must end with the ';' delimiter.