title: c# XML or alternative
body: <p>I am developing a program to log data from a incoming serial communication. I have to invoke the serial box by sending a command, to recieve something. All this works fine, but i have a problem.</p>
  
  <p>The program have to be run from a netbook ( approx: 1,5 gHZ, 2 gig ram ), and it can't keep up when i ask it to save these information to a XML file.</p>
  
  <p>I am only getting communication every 5 second, i am not reading the file anywhere.</p>
  
  <p>I use xml.save(string filename) to save the file.</p>
  
  <p>Is there another, better way, to save the information to my XML, or should i use an alternative?</p>
  
  <p>If i should use an alternative, which should it be?</p>
  
  <p>Edit:
  Added some code:</p>
  
  <pre><code>            XmlDocument xml = new XmlDocument();
              xml.Load(logFile);
  
              XmlNode p = xml.GetElementsByTagName("records")[0];
              for (int i = 0; i &lt; newDat.Length; i++)
              {
                  XmlNode q = xml.CreateElement("record");
  
                  XmlNode a = xml.CreateElement("time");
                  XmlNode b = xml.CreateElement("temp");
                  XmlNode c = xml.CreateElement("addr");
  
                  a.AppendChild(xml.CreateTextNode(outDat[i, 0]));
                  b.AppendChild(xml.CreateTextNode(outDat[i, 1]));
                  c.AppendChild(xml.CreateTextNode(outDat[i, 2]));
  
                  sendTime = outDat[i, 0];
  
                  points.Add(outDat[i, 2], outDat[i, 1]);
  
                  q.AppendChild(a);
                  q.AppendChild(b);
                  q.AppendChild(c);
  
                  p.AppendChild(q);
              }
  
              xml.AppendChild(p);
              xml.Save(this.logFile);
  </code></pre>
  
  <p>This is the XML related code, running once every 5 seconds. I am reading (I get no error), adding some childs, and then saving it again. It is when I save that I get the error.</p>