title: How to Deserialize XMLDocument to object in C#?
body: <p>I have a .Net webserivce that accepts <code>XML</code> in string format. <code>XML</code> String sent into the webserivce can represent any Object in the system. I need to check the first node to figure out what object to deserialize the XML string. For this I will have to load the XML into an <code>XMLDocument</code> (Don't want to use RegEx or string compare). I am wondering if there is a way to Deserialize the <code>XMLDocument/XMLNode</code> rather that deserializing the string to save some performance? Is there going to be any performance benefit serializing the <code>XMLNode</code> rather that the string?</p>
  
  <p>Method to Load XMLDocument</p>
  
  <pre><code>public void LoadFromString(String s)
  {
      m_XmlDoc = new XmlDocument();
      m_XmlDoc.LoadXml(s);        
  }
  </code></pre>
  
  <p>Thanks</p>