Example usage for org.w3c.dom DOMError SEVERITY_ERROR

List of usage examples for org.w3c.dom DOMError SEVERITY_ERROR

Introduction

In this page you can find the example usage for org.w3c.dom DOMError SEVERITY_ERROR.

Prototype

short SEVERITY_ERROR

To view the source code for org.w3c.dom DOMError SEVERITY_ERROR.

Click Source Link

Document

The severity of the error described by the DOMError is error.

Usage

From source file:DOM3.java

public boolean handleError(DOMError error) {
    short severity = error.getSeverity();
    if (severity == DOMError.SEVERITY_ERROR) {
        System.out.println("[dom3-error]: " + error.getMessage());
    }/*from   w w  w  .j a  va  2  s .  com*/

    if (severity == DOMError.SEVERITY_WARNING) {
        System.out.println("[dom3-warning]: " + error.getMessage());
    }
    return true;

}

From source file:com.lostinsoftware.xsdparser.XSDParser.java

@Override
public boolean handleError(DOMError error) {
    short severity = error.getSeverity();
    if (severity == DOMError.SEVERITY_ERROR) {
        System.out.println("[xs-error]: " + error.getMessage());
    }//w w  w  . j a v  a  2 s .c  o  m

    if (severity == DOMError.SEVERITY_WARNING) {
        System.out.println("[xs-warning]: " + error.getMessage());
    }
    return true;
}