static void wrapException(XMLStreamException ex) throws ParsingException {
if (DEBUG) ex.printStackTrace();
String systemID = null;
int lineNumber = -1;
int columnNumber = -1;
Location location = ex.getLocation();
if (location != null) {
lineNumber = location.getLineNumber();
columnNumber = location.getColumnNumber();
systemID = location.getSystemId();
if ("".equals(systemID)) systemID = null;
}
throw new ParsingException(ex.getMessage(),
systemID, lineNumber, columnNumber, ex);