Does anyone know how to solve this error? I dont know where it went wrong.
Any help would be appreciated .Thanks
ERROR
______
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Xml.XmlE xception: The root element is missing.
Source Error:
Line 81: // Load the xml file
Line 82: XmlDocument xmldoc = new XmlDocument();
Line 83: xmldoc.Load( Server.MapPath( "guestbook.xml" ));
Line 84:
Line 85: //Create a new guest element and add it to the root node
Source File: e:\year 3\rhythm\rhythm _fyp\postcommen ts.aspx.cs Line: 83
Stack Trace:
[XmlException: The root element is missing.]
System.Xml.XmlT extReader.Read( ) +876
System.Xml.XmlV alidatingReader .ReadWithCollec tTextToken()
System.Xml.XmlV alidatingReader .Read()
System.Xml.XmlL oader.Load(XmlD ocument doc, XmlReader reader, Boolean
preserveWhitesp ace) +80
System.Xml.XmlD ocument.Load(Xm lReader reader) +72
System.Xml.XmlD ocument.Load(St ring filename)
Rhythm_Fyp.Post Comments.SaveXM LData() in e:\year 3\rhythm\rhythm _fyp\
postcomments.as px.cs:83
Rhythm_Fyp.Post Comments.btnPos t_Click(Object sender, EventArgs e) in e:\
year 3\rhythm\rhythm _fyp\postcommen ts.aspx.cs:71
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.
RaisePostBackEv ent(String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl,
String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()