xml中某些特殊字符被解析的时候会出错 如:
[img]http://dl2.iteye.com/upload/attachment/0109/5424/75c5fa7b-4f42-3d05-a76f-2b02251fe638.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0109/5426/dd5561e4-b2fa-3b8e-8d6e-0b86ddb02574.jpg[/img]
处理方式有以下两种:
1、特殊字符不被解析,包住特殊字符:<![CDATA[ 特殊字符]]>
[img]http://dl2.iteye.com/upload/attachment/0109/5430/ffaf0cef-9182-325f-a062-33c3201b81ba.jpg[/img]
2、替代特殊字符
[img]http://dl2.iteye.com/upload/attachment/0109/5428/ce5a7153-c574-3d89-8bc9-05ee23634cd0.jpg[/img]
一些特殊字符也可用下面的替代符号所代替。
特殊字符 替代符号
& &
< <
> >
" "
' '
[img]http://dl2.iteye.com/upload/attachment/0109/5424/75c5fa7b-4f42-3d05-a76f-2b02251fe638.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0109/5426/dd5561e4-b2fa-3b8e-8d6e-0b86ddb02574.jpg[/img]
处理方式有以下两种:
1、特殊字符不被解析,包住特殊字符:<![CDATA[ 特殊字符]]>
[img]http://dl2.iteye.com/upload/attachment/0109/5430/ffaf0cef-9182-325f-a062-33c3201b81ba.jpg[/img]
2、替代特殊字符
[img]http://dl2.iteye.com/upload/attachment/0109/5428/ce5a7153-c574-3d89-8bc9-05ee23634cd0.jpg[/img]
一些特殊字符也可用下面的替代符号所代替。
特殊字符 替代符号
& &
< <
> >
" "
' '