xml中含有特殊字符 & 时,会报错:
写道
XML Parser Error on line 10: The entity name must immediately follow the '&' in
the entity reference.
the entity reference.
解决方案:
"&" 转义对应的是 &或&
实例:
转换前:
userId="abc" password="abc*&C"/>
转换后:
userId="abc" password="abc*&C"/>