从流request.getInputStream()中读入文本信息,然后按照XML格式进行解析
将处理结果的XML信息写入到response.getOutputStream()中即可,很简单。
至于用什么来处理XML数据就依照你的喜欢而定了http://www.javayou.com

解决方案 »

  1.   

    你可以直接getParameter来拿到这个xml字符串啊(如果使用上传文件的方式则可以使用smartupload之类的),然后分析这个字符串就可以,分析的功能在各个parser都会提供的
    String xml = request.getParameter("xml");
    org.w3c.dom.Document doc = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xml));
      

  2.   

    你可以直接getParameter来拿到这个xml字符串啊(如果使用上传文件的方式则可以使用smartupload之类的),然后分析这个字符串就可以,分析的功能在各个parser都会提供的
    String xml = request.getParameter("xml");
    org.w3c.dom.Document doc = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xml));