用httpService发送xml.toString()到tomcat

System.useCodePage=true;
parameter.xml=("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+this.myDrawBoard.BuildXml().toString());
trace(parameter.xml);
parameter.action="update";
service.method="post";
service.url=this.myDrawBoard.DesignerConstant.URL_UPDATE_PROCESS;
service.addEventListener(ResultEvent.RESULT,saveResultHandler);
service.send(parameter);
------------------------------
function saveResultHandler(event ResultEvent):void{
System.useCodePage=false;//设置回默认
}


public static Document str2Doc(String xmlStr) throws IOException, JDOMException {
        java.io.InputStream inputStream = new ByteArrayInputStream(xmlStr.getBytes("UTF-8"));
        SAXBuilder saxBuilder = new SAXBuilder();
        Document doc = saxBuilder.build(inputStream);
        return doc;
    }

你可能感兴趣的:(java,tomcat,xml)