Example usage for org.xml.sax SAXException SAXException

List of usage examples for org.xml.sax SAXException SAXException

Introduction

In this page you can find the example usage for org.xml.sax SAXException SAXException.

Prototype

public SAXException(Exception e) 

Source Link

Document

Create a new SAXException wrapping an existing exception.

Usage

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public final void processingInstruction(String target, String code) throws SAXException {
    try {//from  ww w.  j  ava2 s  .c o m
        processingInstructionIO(target, code);
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void comment(char[] chars, int start, int length) throws SAXException {
    try {//from   w  w  w .  ja v  a  2 s . com
        comment(new String(chars, start, length));
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void endDocument() throws SAXException {
    try {/*from   ww  w  . j  a  va2 s  .  c  o  m*/
        serializePreRoot();
        this._printer.flush();
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void skippedEntity(String name) throws SAXException {
    try {// w w w .  j a v  a2  s . c om
        endCDATA();
        content();
        this._printer.printText('&');
        this._printer.printText(name);
        this._printer.printText(';');
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public final void startDTD(String name, String publicId, String systemId) throws SAXException {
    try {//from w ww  .ja v a  2 s  . c om
        this._printer.enterDTD();
        this._docTypePublicId = publicId;
        this._docTypeSystemId = systemId;
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void elementDecl(String name, String model) throws SAXException {
    try {/*  www  .  j  ava  2s.com*/
        this._printer.enterDTD();
        this._printer.printText("<!ELEMENT ");
        this._printer.printText(name);
        this._printer.printText(' ');
        this._printer.printText(model);
        this._printer.printText('>');
        if (this._indenting) {
            this._printer.breakLine();
        }
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void attributeDecl(String eName, String aName, String type, String valueDefault, String value)
        throws SAXException {
    try {/*from www .ja  v  a  2s  .  co m*/
        this._printer.enterDTD();
        this._printer.printText("<!ATTLIST ");
        this._printer.printText(eName);
        this._printer.printText(' ');
        this._printer.printText(aName);
        this._printer.printText(' ');
        this._printer.printText(type);
        if (valueDefault != null) {
            this._printer.printText(' ');
            this._printer.printText(valueDefault);
        }
        if (value != null) {
            this._printer.printText(" \"");
            printEscaped(value);
            this._printer.printText('\"');
        }
        this._printer.printText('>');
        if (this._indenting) {
            this._printer.breakLine();
        }
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void internalEntityDecl(String name, String value) throws SAXException {
    try {/*  w  ww  .j  av a 2s.  c o m*/
        this._printer.enterDTD();
        this._printer.printText("<!ENTITY ");
        this._printer.printText(name);
        this._printer.printText(" \"");
        printEscaped(value);
        this._printer.printText("\">");
        if (this._indenting) {
            this._printer.breakLine();
        }
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException {
    try {/*from   w  w w .  j  a v  a2s  . c  om*/
        this._printer.enterDTD();
        unparsedEntityDecl(name, publicId, systemId, null);
    } catch (IOException except) {
        throw new SAXException(except);
    }
}

From source file:mf.org.apache.xml.serialize.BaseMarkupSerializer.java

public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
        throws SAXException {
    try {//ww  w  .j  a  v a 2  s. c o  m
        this._printer.enterDTD();
        if (publicId == null) {
            this._printer.printText("<!ENTITY ");
            this._printer.printText(name);
            this._printer.printText(" SYSTEM ");
            printDoctypeURL(systemId);
        } else {
            this._printer.printText("<!ENTITY ");
            this._printer.printText(name);
            this._printer.printText(" PUBLIC ");
            printDoctypeURL(publicId);
            this._printer.printText(' ');
            printDoctypeURL(systemId);
        }
        if (notationName != null) {
            this._printer.printText(" NDATA ");
            this._printer.printText(notationName);
        }
        this._printer.printText('>');
        if (this._indenting) {
            this._printer.breakLine();
        }
    } catch (IOException except) {
        throw new SAXException(except);
    }
}