title: Programmatically create SharePoint 2010 content type using XML definition file
body: <p>Is there any way to programmatically create a SharePoint 2010 content type using an XML definition file?
  SPFields can be added in the following way:</p>
  
  <pre><code>SPContext.Current.Web.Fields.AddFieldAsXml("&lt;xml /&gt;");
  </code></pre>
  
  <p>Is there any similar way to programmatically add content types to a site collection/site?</p>