Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

XML Root Element is missing

I am looking at this tutorial:
http://www.codeproject.com/KB/aspnet/xmlguestbook.aspx

I get this error:
Exception Details: System.Xml.XmlException: Root element is missing.

Line 62:     Sub PopulateDataSet()
Line 63:         myDataSet = New DataSet()
Line 64:         myDataSet.ReadXml(strFilePath, XmlReadMode.ReadSchema)
Line 65:     End Sub

Source: \Guestbook\Guestbook.aspx.vb    Line: 64

The guestbook.xml file only has this in it right now:
<?xml version="1.0" encoding="utf-8" ?>

What do I need?

Thanks.

Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

if the line mentioned by u is there then the exception will definitely come as its not a valid xml

add at least the basic of you xml
like
<a></a>
or something which can be loaded and treated as xml
Please post your xml and we have a look at it.
Avatar of Starr Duskk

ASKER

ASKER CERTIFIED SOLUTION
Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I gave up on this so will close it out.
thanks.