I'm building an app at the moment which reads XML files containing meta information in user directories.
The problem is that if I put an invalid XML file in there, the parser chokes really badly. Instead of just ignoring it, it says something like:
XML error: mismatched tag at line 9
In this case, all I really care about is being able to quietly extract some values from the XML...
1) If the XML is present
2) If it's valid
3) If the appropriate nodes are there.
Is there some straightforward way of checking if an XML document is valid before using it, so I don't get the nasty errors?
-Antun