@@ -0,0 +1,1186 @@
+package com.qikemi.packages.xmlJsonAndJavaBean.xstream;%0D%0A%0D%0Aimport java.io.Writer;%0D%0A%0D%0Aimport com.thoughtworks.xstream.XStream;%0D%0Aimport com.thoughtworks.xstream.core.util.QuickWriter;%0D%0Aimport com.thoughtworks.xstream.io.HierarchicalStreamWriter;%0D%0Aimport com.thoughtworks.xstream.io.xml.PrettyPrintWriter;%0D%0Aimport com.thoughtworks.xstream.io.xml.XppDriver;%0D%0A%0D%0A/**%0D%0A * CDATA%E6%94%AF%E6%8C%81 %0D%0A * %0D%0A * Create Date: 2014%E5%B9%B410%E6%9C%8813%E6%97%A5 %E4%B8%8B%E5%8D%888:50:11%0D%0A * Author XieXianbin%3Ca.b@hotmail.com%3E%0D%0A * Source Repositories Address: %3Chttps://github.com/qikemi/open-wechat-sdk%3E%0D%0A */%0D%0Apublic class XstreamUtil %7B%0D%0A%0D%0A%09/**%0D%0A%09 * %E6%89%A9%E5%B1%95xstream%EF%BC%8C%E4%BD%BF%E5%85%B6%E6%94%AF%E6%8C%81CDATA%0A%09 */%0D%0A%09private static XStream xstream = new XStream(new XppDriver() %7B%0D%0A%09%09public HierarchicalStreamWriter createWriter(Writer out) %7B%0D%0A%09%09%09return new PrettyPrintWriter(out) %7B%0D%0A%09%09%09%09// %E5%AF%B9%E6%89%80%E6%9C%89xml%E8%8A%82%E7%82%B9%E7%9A%84%E8%BD%AC%E6%8D%A2%E9%83%BD%E5%A2%9E%E5%8A%A0CDATA%E6%A0%87%E8%AE%B0%0D%0A%09%09%09%09boolean cdata = true;%0D%0A%09%09%09%09protected void writeText(QuickWriter writer, String text) %7B%0D%0A%09%09%09%09%09if (cdata) %7B%0D%0A%09%09%09%09%09%09writer.write(%22%3C!%5BCDATA%5B%22);%0D%0A%09%09%09%09%09%09writer.write(text);%0D%0A%09%09%09%09%09%09writer.write(%22%5D%5D%3E%22);%0D%0A%09%09%09%09%09%7D else %7B%0D%0A%09%09%09%09%09%09writer.write(text);%0D%0A%09%09%09%09%09%7D%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D;%0D%0A%09%09%7D%0D%0A%09%7D);%0D%0A%09%0D%0A%09public static XStream getXStream() %7B%0D%0A%09%09xstream.autodetectAnnotations(true);%0D%0A%09%09return xstream;%0D%0A%09%7D%0D%0A%7D%0D%0A

add xstream utils