Hi,
I am getting an exception at the step of XDocument.Load(path).
The exception is it is not an xml format.
If it is not in xml format just ignore it and go for next step.
Thanks
Darma
XDocument.Load()--) exception
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Apr 4, 2013, 3:49 AM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 4, 2013, 3:12 AM EDT
XDocument doc = null;
try
{
doc = XDocument.Load(path);
}
catch(Exception)
{
// don't do anything in here
}
darma tejaRank #3,199 · 449 reputationPosted Apr 4, 2013, 3:47 AM EDT
Thanks for your reply.
But I get this exception in a loop. When i get this exception it goes out of the loop.
My problem is:
If i get exception just ignore present loop number and continue with next loop number.
Thanks
Darma
darma tejaRank #3,199 · 449 reputationPosted Apr 4, 2013, 3:50 AM EDT