How to check the file validation..?
how to check the xml file is validate or notstring[] files = Directory.GetFiles(@"A:\\123", "*.xml", SearchOption.AllDirectories);
how to check the xml file of files[0] is valid or not ......
XMLDocument xmlDom;
Try
{
xmlDom = new XMLDocument();
xmlDom.load("XMl file path");
//xml parse successfully
}
Catch(Exception ex)
{
//xml is not parsed successfully
}
Finally
{
xmlDom = null;
}