title: How to use Datacontract attribute to add namespaces and change the xml root node in mvc4 api
body: <p>I am creating a REST service using asp.net mvc4 web api. My service returns xml as output.
  I want to change some apsects of the xml response including:
  - The xml root node
  - Add namespaces
  - Remove xsi:nil in the xml 
  I am using a datacontext file (Linq to sql dbml file) in my model and not a user defined class.
  I have read from this link <a href="http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization" rel="nofollow">http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization</a>  that I can use DataContract to do so but don't know how to implement that in my case.
  I do not want to use message handlers since this will require loading the entire xml in a string and might affect performance regarding that the xml output returned might be big</p>
  
  <p>please help...</p>