org.w3c.dom.DOMLocator Java Examples
The following examples show how to use
org.w3c.dom.DOMLocator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SchemaBuilder.java From xml-avro with Apache License 2.0 | 5 votes |
void throwExceptionIfHasError() { if (exception != null) throw new ConverterException(exception); if (error != null) { if (error.getRelatedException() instanceof Throwable) throw new ConverterException((Throwable) error.getRelatedException()); DOMLocator locator = error.getLocation(); String location = "at:" + locator.getUri() + ", line:" + locator.getLineNumber() + ", char:" + locator.getColumnNumber(); throw new ConverterException(location + " " + error.getMessage()); } }
Example #2
Source File: DOMErrorHandlerWrapper.java From Bytecoder with Apache License 2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #3
Source File: DOMErrorImpl.java From j2objc with Apache License 2.0 | 4 votes |
public DOMLocator getLocation() { return NULL_DOM_LOCATOR; }
Example #4
Source File: DOMErrorHandlerWrapper.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #5
Source File: DOMErrorImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #6
Source File: DOMErrorHandlerWrapper.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #7
Source File: DOMErrorImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #8
Source File: DOMErrorHandlerWrapper.java From hottub with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #9
Source File: DOMErrorImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #10
Source File: DOMErrorHandlerWrapper.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #11
Source File: DOMErrorImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #12
Source File: DOMErrorImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #13
Source File: DOMErrorImpl.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #14
Source File: DOMErrorHandlerWrapper.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #15
Source File: DOMErrorImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #16
Source File: DOMErrorHandlerWrapper.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #17
Source File: DOMErrorImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #18
Source File: DOMErrorHandlerWrapper.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #19
Source File: DOMErrorImpl.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #20
Source File: DOMErrorHandlerWrapper.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #21
Source File: DOMErrorImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #22
Source File: DOMErrorHandlerWrapper.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #23
Source File: DOMErrorImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * The location of the error. */ public DOMLocator getLocation() { return fLocator; }
Example #24
Source File: DOMErrorHandlerWrapper.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** Prints the error message. */ private void printError(DOMError error) { int severity = error.getSeverity(); fOut.print("["); if ( severity == DOMError.SEVERITY_WARNING) { fOut.print("Warning"); } else if ( severity == DOMError.SEVERITY_ERROR) { fOut.print("Error"); } else { fOut.print("FatalError"); eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to?? } fOut.print("] "); DOMLocator locator = error.getLocation(); if (locator != null) { fOut.print(locator.getLineNumber()); fOut.print(":"); fOut.print(locator.getColumnNumber()); fOut.print(":"); fOut.print(locator.getByteOffset()); fOut.print(","); fOut.print(locator.getUtf16Offset()); Node node = locator.getRelatedNode(); if (node != null) { fOut.print("["); fOut.print(node.getNodeName()); fOut.print("]"); } String systemId = locator.getUri(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) systemId = systemId.substring(index + 1); fOut.print(": "); fOut.print(systemId); } } fOut.print(":"); fOut.print(error.getMessage()); fOut.println(); fOut.flush(); }
Example #25
Source File: DOMErrorImpl.java From Bytecoder with Apache License 2.0 | 2 votes |
/** * The location of the DOMError. * * @return A DOMLocator object containing the DOMError location. */ public DOMLocator getLocation() { return fLocation; }
Example #26
Source File: DOMErrorImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * The location of the DOMError. * * @return A DOMLocator object containing the DOMError location. */ public DOMLocator getLocation() { return fLocation; }
Example #27
Source File: DOMErrorImpl.java From j2objc with Apache License 2.0 | 2 votes |
/** * The location of the DOMError. * * @return A DOMLocator object containing the DOMError location. */ public DOMLocator getLocation() { return fLocation; }