title: Sending Xml from $http in Angularjs to webapi
body: <p>I have a webapi  method and  below $http service call in angular app :-</p>
  
  <pre><code>[HttpPost]
  Public Employee Getdata ([FROMBODY] XElement  objxml)
  { }
  
  
  $http({
  url : wwww.google.com,
  method : 'POST',
  data : $.param({
          xml: vm.inputxml
         }),
  headers : {'Content-Type' : 'application/xml'}
  })
  </code></pre>
  
  <h1>The vm.inputxml is nothing but xml pasted on html page.</h1>
  
  <p>The problem here is webapi throws an  error as, 
  "There was an error deserializing the object of type  system.xml.linq.Xelement , The data at root level is invalid".</p>
  
  <p>Can you please suggest a way how can we send xml from angular to webapi.
  The web api input type Xlelement can not be changed or it can accept only xml type as xmlreader etc. but the i/p can not be changed to string.
  Please Suggest the way.. will be very thankful for the help.</p>