首页 > 代码库 > XML含多个特殊字符处理

XML含多个特殊字符处理

解决方案:

在字符串包一个CDATA标签即可

<![CDATA[ 字符串写在这 ]]>

   <website id="W1006">
        <resources>
            <resource id="W100601" encoding="GBK">
                <download-page-size value=http://www.mamicode.com/"2"/>
                <save-path>G:\moks\work\resource\wnp</save-path>
                <type value=http://www.mamicode.com/"T131"/>
                <uri><![CDATA[http://s.taobao.com/search?&stats_click=search_radio_all%253A1&js=1&initiative_id=staobaoz_20140726&q=%CF%E3%B8%DB%B4%FA%B9%BA%BB%AF%D7%B1%C6%B7&suggest=0_3&wq=%CF%E3%B8%DB%B4%FA%B9%BA&suggest_query=%CF%E3%B8%DB%B4%FA%B9%BA&source=suggest]]></uri>
            </resource>
        </resources>
   </website>

XML含多个特殊字符处理