title: How can I read an XML file in a Web API app?
body: <p>If this makes any difference, the XML file is being sent from a handheld device.</p>
  
  <p>There are a couple of interesting answers to a similar question <a href="https://stackoverflow.com/questions/18607381/how-to-read-xml-from-asp-net-web-api">here</a>, but I'm not sure the more popular answer really addresses my situation (where the client seems to be passing a custom type (ComputerInfo)) whereas in my case it is an actual XML file is the arg being passed.</p>
  
  <p>The second answer looks perhaps more "up my alley/what the doctor ordered" but I don't know what signature my method should have. Something like this:</p>
  
  <pre><code>public async Task&lt;HttpResponseMessage&gt; PostXMLFile(XMLDocument xmlFile) {
  </code></pre>
  
  <p>?</p>
  
  <p>Adding to my doubts is that the XMLDocument type is unrecognized, and there is no "Resolve" context menu item to formally introduce it to the project).</p>
  
  <p>And, can a CF app deal with a returned Task anyway? I doubt it, so: what should my Web API method receiving an XML file look like?</p>