title: How to send a XML doc to server from client in jQuery
body: <p>I'm trying to send XML doc to server from client. But when server get a XML doc. It's always empty. Here is my jquery function. It's send XML to server:</p>
  
  <pre><code>var str = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;foo&gt;&lt;bar&gt;Hello World&lt;/bar&gt;&lt;/foo&gt;';
      var xmlData = strToXml(str); // convert string to xml
      console.log($.isXMLDoc(xmlData)); // return true
      $.ajax({
          url: 'foo.bar'
          , processData: false
          , data: xmlData
          , success: function(response){
              console.log(response);
          }
          , error: function(response) {
              console.log(response);
          }
      });
  </code></pre>
  
  <p>And server side code. It's recieve a xml doc.</p>
  
  <pre><code>try {
              HttpServletRequest request = ServletActionContext.getRequest();
              InputStream is = request.getInputStream();
              BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
              String line = "";
              System.out.println(reader.read()); // return -1
              while((line = reader.readLine()) != null) {
                  System.out.println(line);
              }
          } catch (IOException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>Can you guys put some working example? And thank you for any advice and post.</p>