XML Error ignore and skip

so I have a project that reads a bunch of .xml files and parses the data from them, it seems that on some of them there are errors and I want when I catch something like this to skip over and ignore the error and jump to the next file.