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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 4, 2013, 7:49 AM
darma tejaPosted Apr 4, 2013, 7:50 AM
darma tejaPosted Apr 4, 2013, 7:47 AM
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
VulpesPosted Apr 4, 2013, 7:12 AM
XDocument doc = null;
try
{
doc = XDocument.Load(path);
}
catch(Exception)
{
// don't do anything in here
}