how to find the error in xml file in C#.
-
hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.
-
hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.
Load your xml file in an XmlDocument object inside a try-catch block before at he beginning. If you catch an exception close your app or show a message to the user or do whatever you need.
-
hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.
-
hi every one how to find the error in xml file. i am writing a application in that iam using xml file. but if any error in xml file that exe not working. i want to know error in xml file while opening my application.
I would suggest you to create an XSD (schema definition), This will validate the XML for correctness. After loading XML, Use the validateSchema method and pass required XSD and check for the correctness. Hope this helps
Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com http://jaiprakash.blog.com/