Recovering from Errors

Unfortunately, once parsing error has occurred in the reading of an XML file, there's little you can do to recover. As demonstrated by the alert box informing you that the root node is null, the error prevents any data from being loaded. Therefore, the only possible recovery would be to read the data from another file.

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.