标准XML包括特殊符号问题
2014-03-05 14:29
274 查看
有时候我们会用到XML,XML里面会有一些特殊符号,会影响标准xml的格式显示,所以不能出现。但有时这些符号我们还必须的用他,所以就要用一个<![cdata[]]>来解决问题,如下:
<?xml version="1.0"
encoding="utf-8" ?>
<clientReqResponse version="1" xmlns="http://app.wenbe.com">
<menu
count="1">
<colum id="1" pagenumber="5">
<page>1</page>
<title>男人健身史</title>
</colum>
</menu>
<pageview id="1" pagenumber="5"
image="/zazhi/book/2013-06/image/201309161819186406.png">
<text><![CDATA[<img alt=""
src="/zazhi/book/2013-06/image/201309161819186406.png"
/> ]]></text>
<widget effectid="1" x="2" y="5" width="50"
height="20">
<masterimage x="2" y="5"
width="50" height="20">
<image>/zazhi/book/2013-06/image/201309161819186406.png</image>
</masterimage>
<imagelist x="2" y="5" width="50"
height="20"
masterimage="/zazhi/book/2013-06/image/201309161819186406.png">
<image>/zazhi/book/2013-06/image/201309161819186406.png</image>
</imagelist>
</widget>
<widget effectid="4" x="2" y="5" width="50"
height="20">
<buttonimage><![CDATA[<img alt=""
src="/zazhi/book/2013-06/image/201309161819186406.png"
/>]]></buttonimage>
</widget>
</pageview>
</clientReqResponse>
<?xml version="1.0"
encoding="utf-8" ?>
<clientReqResponse version="1" xmlns="http://app.wenbe.com">
<menu
count="1">
<colum id="1" pagenumber="5">
<page>1</page>
<title>男人健身史</title>
</colum>
</menu>
<pageview id="1" pagenumber="5"
image="/zazhi/book/2013-06/image/201309161819186406.png">
<text><![CDATA[<img alt=""
src="/zazhi/book/2013-06/image/201309161819186406.png"
/> ]]></text>
<widget effectid="1" x="2" y="5" width="50"
height="20">
<masterimage x="2" y="5"
width="50" height="20">
<image>/zazhi/book/2013-06/image/201309161819186406.png</image>
</masterimage>
<imagelist x="2" y="5" width="50"
height="20"
masterimage="/zazhi/book/2013-06/image/201309161819186406.png">
<image>/zazhi/book/2013-06/image/201309161819186406.png</image>
</imagelist>
</widget>
<widget effectid="4" x="2" y="5" width="50"
height="20">
<buttonimage><![CDATA[<img alt=""
src="/zazhi/book/2013-06/image/201309161819186406.png"
/>]]></buttonimage>
</widget>
</pageview>
</clientReqResponse>
相关文章推荐
- python替换UTF-8编码文本中任意特殊字符,包括中文符号问题:大量文本,将其中的特殊字符用空
- 关于特殊符号在XML中的问题
- ios中解决xml特殊符号的问题
- 解决replaceAll替换字符串中包括特殊符号时出现的问题
- xml中 特殊符号转义替换
- url参数中有+、空格、=、%、&、#等特殊符号的问题解决
- office 2003 无法插入特殊符号问题 [转]
- 解决xml中&符号"&amp;"输入问题的一个思路
- 关于Solr6.3标准分词源码分析一(如何改动源码,达到分词特殊符号的功能)
- string.xml 中显示特殊符号
- 使用jxl.jar解析excel特殊符号乱码问题解决.
- android中string.xml中的特殊符号写法
- XML特殊符号
- 一些特殊符号&%$等等,如何写在xml,TextView中
- XML中输入特殊符号
- 工作日志 6/6/2014 .net URL 特殊符号 escaping的问题
- preg_replace—替换内容中包括$特殊符号时
- Android string.xml 显示特殊符号
- TextField htmlText 以及xml里"<" 和 ">" 等特殊字符的显示问题
- xml特殊符号处理