title: Convert JSON to XML and save XML
body: <p>I am trying to convert some JSON to XML and then save it using JSON.NET in C# but i can't seem to get it.</p>
  
  <p>Here is what i have:</p>
  
  <pre><code>using System.XML;
  using Newtonsoft;
  
  XmlDocument doc = (XmlDocument)Newtonsoft.Json.JsonConvert.DeserializeXmlNode(json);
  XmlTextWriter writer = new XmlTextWriter("json.xml", null);
  writer.Formatting = Formatting.Indented;
  doc.Save(writer);
  </code></pre>