title: Is this a normal xml format?
body: <pre><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt; 
   &lt;response uri=\"/crm/private/xml/Potentials/updateRecords\"&gt;
     &lt;result&gt;
        &lt;message&gt;***TEST***Record(s) updated successfully&lt;/message&gt;
        &lt;recorddetail&gt;
            &lt;FL val=\"Id\"&gt;414100000000000000&lt;/FL&gt;
            &lt;FL val=\"Created Time\"&gt;2012-03-30 16:54:03&lt;/FL&gt;
            &lt;FL val=\"Modified Time\"&gt;2012-04-11 16:53:48&lt;/FL&gt;
            &lt;FL val=\"Created By\"&gt;&lt;![CDATA[Bayer]]&gt;&lt;/FL&gt;
            &lt;FL val=\"Modified By\"&gt;&lt;![CDATA[Bayer]]&gt;&lt;/FL&gt;
        &lt;/recorddetail&gt;
    &lt;/result&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>This is a generic response from Zoho stating that my record was updated successfully (minus the test part and the bogus ZohoID.) I have been trying to get my C# program to be able to make that style of xml document because when i post things to zoho it actually is very similar in style. But i just can't figure out how to make it work This is an example from their website.</p>
  
  <pre><code>&lt;Leads&gt;
  &lt;row no="1"&gt;
  &lt;FL val="Lead Source"&gt;Web Download&lt;/FL&gt;
  &lt;FL val="First Name"&gt;contacto 1&lt;/FL&gt;
  &lt;FL val="Last Name"&gt;apellido&lt;/FL&gt;
  &lt;FL val="Email"&gt;testing@testing.com&lt;/FL&gt;
  &lt;FL val="Title"&gt;Manager&lt;/FL&gt;
  &lt;FL val="Phone"&gt;1234567890&lt;/FL&gt;
  &lt;FL val="Home Phone"&gt;0987654321&lt;/FL&gt;
  &lt;FL val="Other Phone"&gt;1212211212&lt;/FL&gt;
  &lt;FL val="Fax"&gt;02927272626&lt;/FL&gt;
  &lt;FL val="Mobile"&gt;292827622&lt;/FL&gt;
  &lt;/row&gt;
  &lt;/Leads&gt;
  </code></pre>
  
  <p>I am trying to replicate it using a unit test in C#, but it gives me errors of all kinds.. i've lost all the different ways that i've tried, but i'll post what i currently have and the error it is throwing.</p>
  
  <pre><code>    [Test]
      public void TestMethod()
      {
          XmlDocument doc = new XmlDocument();
          XmlDeclaration declare = doc.CreateXmlDeclaration("1.0", null, null);
          doc.AppendChild(declare);
          doc.AppendChild(doc.CreateElement("Potentials"));
          doc.AppendChild(doc.CreateAttribute("FL", "AccountName", "Robert Snyder"));
  
          doc.Save("C:\\test.xml");
          //doc.WriteContentTo(XmlWriter.Create("C:\\test.xml"));
      }
  </code></pre>
  
  <p>Exception</p>
  
  <blockquote>
    <p>System.InvalidOperationException : The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type. - c:\Subversion\ZohoApi\ZohoApi\Tests\XmlDataTests.cs:22</p>
  </blockquote>
  
  <p>Please help me understand this a little better. I have been trying for a long time, and just can't figure it out.</p>