title: XmlAttribute value and innertext
body: <p>I have a piece of code that fills a hashtable with strings, per example: ("name", Oscar). I want to use them to fill (just by memory usage) values and innertexts of XMLAtributes. But there is one problem.</p>
  
  <pre><code>XmlElement Co = newDoc.CreateElement("Co1");
  
   XmlAttribute series = Co.Attributes.Append(newDoc.CreateAttribute("series"));
           series.InnerText = (string)vector["series"];
           series.Value = (string)vector["series"];
           MessageBox.Show((string)vector["series"]);
           MessageBox.Show(Co.Attributes["series"].InnerText.ToString());
           MessageBox.Show(Co.Attributes["series"].Value.ToString());
  </code></pre>
  
  <p>When ever I want the system to show me the value or the innertext (within the xml create method this piece of code is in) it has it returns nothing. Then It passes to the next atribute and returns a  "Object reference not set to an instance of an object.". The next piece of code is this one:</p>
  
  <pre><code>XmlAttribute folio = Co.Attributes.Append(newDoc.CreateAttribute("folio"));
               folio.InnerText = vector["folio"].ToString();
  </code></pre>
  
  <p>The error hits in the last line.</p>
  
  <p>In any other place of the class I can see  and retrieve the values of the hastable by the .ToString() method and the cast.</p>
  
  <p>It seems that Im not properly getting the value out of my hashtable or there is something I am missing with the XMLAtributes... ¿What is the proper way to do so?</p>