title: Errors when using ajax post request to geoserver
body: <p>I am trying to send a http post request using ajax post to geoserver. I get the following error in chrome.</p>
  
  <pre><code> Uncaught SyntaxError: Unexpected identifier
  </code></pre>
  
  <p>when I use data: <code>--my query--</code> and</p>
  
  <pre><code> Uncaught SyntaxError: Unexpected token ILLEGAL
  </code></pre>
  
  <p>when I use data: <code>--my query--</code>.</p>
  
  <p>I see that it is the error is due to the closing tag eg: <code>&lt;/ogc:PropertyName&gt;</code></p>
  
  <p>This my code:</p>
  
  <pre><code>$.ajax({
    type: "POST",
    url: "http://localhost/geoserver", 
    data: '
      &lt;wfs:GetFeature
        xmlns:wfs="http://www.opengis.net/wfs"      
        xmlns:ogc="http://www.opengis.net/ogc"
        service="WFS" version="1.1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"
        maxFeatures= "13" &gt;
          &lt;wfs:Query typeName="*:MyFeatures_df16" xmlns:feature="http://www.openplans.org/topp"&gt;
            &lt;ogc:Filter&gt;
              &lt;ogc:And&gt;
                &lt;ogc:Or&gt;
                  &lt;ogc:PropertyIsEqualTo&gt;
                    &lt;ogc:PropertyName&gt;ID&lt;/ogc:PropertyName&gt;
                    &lt;ogc:Literal&gt;98400005701&lt;/ogc:Literal&gt;
                  &lt;/ogc:PropertyIsEqualTo&gt;
                &lt;/ogc:Or&gt;                
              &lt;/ogc:And&gt;
            &lt;/ogc:Filter&gt;
          &lt;/wfs:Query&gt;
        &lt;/wfs:GetFeature&gt; ',
    contentType: "text/xml",
    dataType:"text",
    crossDomain: true,
    cache: false,
    error: function() {alert('it doesnt work')},
    success: function(result){ $("#div1").html(result);}
    });
  });
  });
  </code></pre>