Hi all i just got this form VB at the movies example

VB Code:
  1. Dim xmlDoc As New XmlDocument
  2.         Dim xmlDeclare As XmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", "yes")
  3.         Dim xmlComment As XmlComment = xmlDoc.CreateComment("Created by " & Site_URL)
  4.  
  5.         Dim xmlRoot As XmlElement = xmlDoc.CreateElement("Errors")
  6.         Dim xmlPosted As XmlAttribute = xmlDoc.CreateAttribute("Posted")
  7.         Dim xmlPage As XmlElement = xmlDoc.CreateElement("PageWithError")
  8.         Dim xmlErrMsg As XmlElement = xmlDoc.CreateElement("ErrorOccurred")
  9.  
  10.         xmlDoc.InsertBefore(xmlDeclare, xmlDoc.DocumentElement)
  11.         xmlDoc.InsertAfter(xmlComment, xmlDeclare)
  12.         xmlDoc.InsertAfter(xmlRoot, xmlComment)
  13.  
  14.         xmlPosted.InnerText = Now()
  15.         xmlPage.InnerText = "page.aspx"
  16.         xmlErrMsg.InnerText = "just testing"
  17.  
  18.         xmlRoot.SetAttributeNode(xmlPosted)
  19.         xmlRoot.AppendChild(xmlPage)
  20.         xmlRoot.AppendChild(xmlErrMsg)
  21.  
  22.         xmlDoc.Save("WebSiteErrors.xml")

it creates the xml document and node fine but i would like to have another method in my class AddChildNode()

this will just append another node to the xml document

what i am doing is having a class file for trapping errors

i passed the page it errored and the string of error message
then view the xml document in a little app im making

thanks all

this is currently what im getting

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--Created by http://www.katiya.com-->
<Errors Posted="12/06/2004 10:58:37">
  <PageWithError>page.aspx</PageWithError>
  <ErrorOccurred>just testing</ErrorOccurred>
</Errors>
this is what i want

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--Created by http://www.katiya.com-->
<Errors Posted="12/06/2004 10:58:37">
  <PageWithError>page.aspx</PageWithError>
  <ErrorOccurred>just testing</ErrorOccurred>
</Errors>
<Errors Posted="12/06/2004 10:58:37">
  <PageWithError>page.aspx</PageWithError>
  <ErrorOccurred>just testing</ErrorOccurred>
</Errors>
<Errors Posted="12/06/2004 10:58:37">
  <PageWithError>page.aspx</PageWithError>
  <ErrorOccurred>just testing</ErrorOccurred>
</Errors>
<Errors Posted="12/06/2004 10:58:37">
  <PageWithError>page.aspx</PageWithError>
  <ErrorOccurred>just testing</ErrorOccurred>
</Errors>