title: Adding node to existing xml element
body: <p>I'm getting this error when trying to append a node to existing element in my xml document.The error is: Object reference not set to an instance of an object.</p>
  
  <pre><code>&lt;houses&gt;
    &lt;house windowsc="three"&gt;
      &lt;wind&gt;0&lt;/wind&gt;
      &lt;windows&gt;
      &lt;/windows&gt;
    &lt;/house&gt;
  &lt;/houses&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>XmlDocument xDoc = new XmlDocument();
  
  xDoc.Load("C:\\Houseplans.xml");
  
  XmlElement xhousing = xDoc.DocumentElement["houses/house[@windowsc=\"three\"]/windows"];
  XmlNode xName = xDoc.CreateElement("Name");
  xName.InnerText = "hi";
  xhousing.AppendChild(xName);
  </code></pre>