TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Empty XML Docuement File error
Jul 25 2013 11:56 AM
I get an error below when an xml file is blank or empty. What to do in this case????
Error Received: There is an error in XML Document (0,0)
XmlSerializer serializer = new XmlSerializer(typeof(Colors));
TextReader textReader = new StreamReader(colorName);
colorfile = (Colors)serializer.Deserialize(textReader);
Error on this line of code, What to do for this case when the file is empty??? I want to to be able to still save data to the file.
textReader .Close();
When deserializing the object is the file is empty and I get a document error. I am assuming the because do not the xml document header attributes,
Reply
Answers (
13
)
how to select more picturebox control together in sequence?
i want to run images in forloop with reteriving images db