try {
parser.Read();
//noinspection ConstantIfStatement
if (false) throw new XmlException("dummy"); // keeps the compiler happy
//noinspection ConstantIfStatement
if (false) throw new XmlSchemaException("dummy", new XmlException("dummy")); // keeps the compiler happy
} catch (XmlException e) {
XPathException de = new XPathException("Error reported by XML parser: " + e.getMessage(), e);
ExpressionLocation loc = new ExpressionLocation();
loc.setSystemId(getSystemId());
loc.setLineNumber(e.get_LineNumber());