Package javolution.xml.stream

Examples of javolution.xml.stream.XMLStreamException


    public void flush() throws XMLStreamException {
        flushBuffer();
        try {
            _writer.flush();
        } catch (IOException e) {
            throw new XMLStreamException(e);
        }
    }
View Full Code Here


    // Implements XMLStreamWriter interface.
    public void writeAttribute(CharSequence localName, CharSequence value)
            throws XMLStreamException {
        if (localName == null)
            throw new XMLStreamException("Local name cannot be null");
        if (value == null)
            throw new XMLStreamException("Value cannot be null");
        writeAttributeOrNamespace(null, null, localName, value);
    }
View Full Code Here

    // Implements XMLStreamWriter interface.
    public void writeAttribute(CharSequence namespaceURI,
            CharSequence localName, CharSequence value)
            throws XMLStreamException {
        if (localName == null)
            throw new XMLStreamException("Local name cannot be null");
        if (value == null)
            throw new XMLStreamException("Value cannot be null");
        if (namespaceURI == null)
            throw new XMLStreamException("Namespace URI cannot be null");
        writeAttributeOrNamespace(null, namespaceURI, localName, value);
    }
View Full Code Here

    // Implements XMLStreamWriter interface.
    public void writeAttribute(CharSequence prefix, CharSequence namespaceURI,
            CharSequence localName, CharSequence value)
            throws XMLStreamException {
        if (localName == null)
            throw new XMLStreamException("Local name cannot be null");
        if (value == null)
            throw new XMLStreamException("Value cannot be null");
        if (namespaceURI == null)
            throw new XMLStreamException("Namespace URI cannot be null");
        if (prefix == null)
            throw new XMLStreamException("Prefix cannot be null");
        writeAttributeOrNamespace(prefix, namespaceURI, localName, value);
    }
View Full Code Here

    // Implements XMLStreamWriter interface.
    public void writeProcessingInstruction(CharSequence target,
            CharSequence data) throws XMLStreamException {
        if (target == null)
            throw new XMLStreamException("Target cannot be null");
        if (data == null)
            throw new XMLStreamException("Data cannot be null");
        if (_isElementOpen)
            closeOpenTag();
        writeNoEscape("<?");
        writeNoEscape(target);
        write(' ');
View Full Code Here

    }

    // Implements XMLStreamWriter interface.
    public void writeCData(CharSequence data) throws XMLStreamException {
        if (data == null)
            throw new XMLStreamException("Data cannot be null");
        if (_isElementOpen)
            closeOpenTag();
        writeNoEscape("<![CDATA[");
        writeNoEscape(data);
        writeNoEscape("]]>");
View Full Code Here

    }

    // Implements XMLStreamWriter interface.
    public void writeDTD(CharSequence dtd) throws XMLStreamException {
        if (dtd == null)
            throw new XMLStreamException("DTD cannot be null");
        if (_nesting > 0)
            throw new XMLStreamException(
                    "DOCTYPE declaration (DTD) when not in document root (prolog)");
        writeNoEscape(dtd);
    }
View Full Code Here

    // Implements XMLStreamWriter interface.
    public void writeStartDocument(CharSequence encoding, CharSequence version)
            throws XMLStreamException {
        if (_nesting > 0)
            throw new XMLStreamException("Not in document root");
        writeNoEscape("<?xml version=\"");
        if (version != null) {
            writeNoEscape(version);
            write('"');
        } else { // Default to 1.0
View Full Code Here

            if (_isRepairingNamespaces) { // Repairs prefix.
                prefix = getRepairedPrefix(prefix, namespaceURI);
            } else if (prefix == null) { // Retrieves prefix.
                prefix = getPrefix(namespaceURI);
                if (prefix == null)
                    throw new XMLStreamException("URI: " + namespaceURI
                            + " not bound and repairing namespaces disabled");
            }
            if (prefix.length() > 0) {
                qName.append(prefix);
                qName.append(':');
View Full Code Here

            if (_isRepairingNamespaces) { // Repairs prefix if current prefix is not correct.
                prefix = getRepairedPrefix(prefix, namespaceURI);
            } else if (prefix == null) {
                prefix = getPrefix(namespaceURI);
                if (prefix == null)
                    throw new XMLStreamException("URI: " + namespaceURI
                            + " not bound and repairing namespaces disabled");
            }
            if (prefix.length() > 0) {
                writeNoEscape(prefix);
                write(':');
View Full Code Here

TOP

Related Classes of javolution.xml.stream.XMLStreamException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.