title: Only one top level element is allowed in an XML document
body: <p>Following is the code for inserting new nodes in an xml file .</p>
  
  <pre><code>Dim fleStream As New FileStream("C:\mailing.xml", FileMode.Append, FileAccess.Write,FileShare.ReadWrite)
  Dim stmWriter As New StreamWriter(fleStream)
  Dim writer As New XmlTextWriter(stmWriter)
  Dim currNode As XmlNode
  Dim doc As New XmlDocument
  
  doc.LoadXml(("&lt;XMLFile&gt;" + " &lt;EMail&gt;&lt;/EMail&gt;" + "&lt;/XMLFile&gt;"))
  'doc.Load("C:\mailing.xml") '
  Dim docFrag As XmlDocumentFragment = doc.CreateDocumentFragment()
  docFrag.InnerXml = "&lt;From&gt;&lt;Address&gt;" + txtFrom.Text + " &lt;/Address&gt;&lt;/From&gt;"
  currNode = doc.DocumentElement.FirstChild.AppendChild(docFrag)
  currNode.InsertAfter(docFrag, currNode.LastChild)
  
  docFrag.InnerXml = "&lt;Receipient&gt; &lt;To&gt;" + txtTo.Text + " &lt;/To&gt;&lt;/Receipient&gt;"
  currNode = doc.DocumentElement.FirstChild.FirstChild.AppendChild(docFrag)
  currNode.InsertAfter(docFrag, currNode.LastChild)
  
  docFrag.InnerXml = "&lt;Subject&gt;" + txtSubject.Text + "&lt;/Subject&gt;"
  currNode = doc.DocumentElement.FirstChild.AppendChild(docFrag)
  currNode.InsertAfter(docFrag, currNode.LastChild)
  
  docFrag.InnerXml = "&lt;Body&gt;" + txtBody.Text + "&lt;/Body&gt;"
  currNode = doc.DocumentElement.FirstChild.AppendChild(docFrag)
  currNode.InsertAfter(docFrag, currNode.LastChild)
  
  doc.Save(writer)
  'doc.Save("C:\xmlmailfile.xml") '
  writer.Flush()
  stmWriter.Flush()
  stmWriter.Close()
  </code></pre>
  
  <p>By executing this i cant able to view the result in IE,an error msg comes as 
  "The XML page cannot be displayed </p>
  
  <h2>Cannot view XML input using XSL style sheet.</h2>
  
  <p>Only one top level element is allowed in an XML document. Error processing resource 'file:///C:/mailing.xml'. Line 2, Posi...</p>
  
  <p>asdasd@qwe.com 
  
  <p>When i open the xml file the datas are entered,Can anyone help me to solve the pblm.What modifications are to be done in my code?</p>