xml
共 2 篇文章
xml中含有特殊字符 &
xml中含有特殊字符 & 时,会报错: 写道 XML Parser Error on line 10: The entity name must immediately follow the '&' in the entity reference. 解决方案: "&" 转义对应的是 &或& 实例: 转换前: userId="abc" password="abc*&C"/> 转换后: userId="abc" password="abc*&C"/>
2013-02-25 16:29 · xml
解析xml文件常见问题
Xml 解析常见问题 : 1. 我们自己解析xml的时候,一定要记得将dtd的声明去掉 2. 使用xpath查找路径的时候,如果有字符串的参数,要注意加双引号。 比如: String xpath = "/dwr/allow/create[@javascript='" + fields+ "']";
2012-09-02 16:45 · xml