title: How a add a XMl node attributes using C#?
body: <p>I need to add a following XML node in XML files. </p>
  
  <pre><code>&lt;preference name='phonegap-version' value='cli-5.1.1' /&gt;
  </code></pre>
  
  <p>But I am getting like </p>
  
  <pre><code>&lt;preference name="'phonegap-version' value='cli-5.1.1'" xmlns="" /&gt;
  </code></pre>
  
  <p>I have used the following code in C#.</p>
  
  <pre><code>XmlElement preference = doc.CreateElement("preference");
  root.AppendChild(preference);
  XmlAttribute newAttribute = doc.CreateAttribute("name");
  newAttribute.Value="'phonegap-version' value='cli-5.1.1'";
  preference.Attributes.Append(newAttribute);
  </code></pre>
  
  <p>Could you please resolve ? 
  Thanks in advance...</p>