Package javax.xml.stream

Examples of javax.xml.stream.XMLStreamException


     */

    protected static void throwOutputError(String msg)
        throws XMLStreamException
    {
        throw new XMLStreamException(msg);
    }
View Full Code Here


     */

    protected final void throwOutputError(String msg)
        throws XMLStreamException
    {
        throw new XMLStreamException(msg);
    }
View Full Code Here

             *   ns/local-name pairs without intermediate objects
             */
            mAttrSet = new HashSet<AttrName>();
        }
        if (!mAttrSet.add(an)) {
            throw new XMLStreamException("Duplicate attribute write for attribute '"+an+"'");
        }
    }
View Full Code Here

        throws XMLStreamException
    {
        // Need a prefix...
        String prefix = mCurrElem.getPrefix(nsURI);
        if (prefix == null) {
            throw new XMLStreamException("Unbound namespace URI '"+nsURI+"'");
        }
        checkStartElement(localName, prefix);
        if (mValidator != null) {
            mValidator.validateElementStart(localName, nsURI, prefix);
        }
View Full Code Here

            }
        }
           
        // Have to have a system id, then...
        if (systemId == null) {
            throw new XMLStreamException("Can not resolve "
                                         +((entityName == null) ? "[External DTD subset]" : ("entity '"+entityName+"'"))+" without a system id (public id '"
                                         +publicId+"')");
        }
        URL url = URLUtil.urlFromSystemId(systemId, pathCtxt);
        return sourceFromURL(parent, cfg, entityName, xmlVersion, url, publicId);
View Full Code Here

            r = new UTF32Reader(cfg, in, cfg.allocFullBBuffer(inputBufLen), 0, 0, recycleBuffer, isBE);
        } else {
            try {
                return new InputStreamReader(in, encoding);
            } catch (UnsupportedEncodingException ex) {
                throw new XMLStreamException("[unsupported encoding]: "+ex);
            }
        }

        if (isXml11) { // only need to set if we are xml 1.1 compliant (1.0 is the default)
            r.setXmlCompliancy(XmlConsts.XML_V_11);
View Full Code Here

     * where this cursor was last valid)
     */
    public XMLStreamException constructStreamException(String msg)
    {
        // !!! TODO: use StaxMate-specific sub-classes of XMLStreamException?
        return new XMLStreamException(msg, getStreamLocation());
    }
View Full Code Here

        throws XMLStreamException
    {
        try {
            return XmlFactoryAccessor.getFactory();
        } catch (FactoryConfigurationError err) {
            throw new XMLStreamException(err);
        }
    }
View Full Code Here

        InputStream is;
        try {
            is = overflowBlob.getInputStream();
        }
        catch (IOException ex) {
            throw new XMLStreamException(ex);
        }
        return new WrappedTextNodeStreamReader(
                BaseConstants.DEFAULT_TEXT_WRAPPER, new InputStreamReader(is, charset));
    }
View Full Code Here

    private void chainProcessEvent(XMLSecEvent xmlSecEvent) throws XMLStreamException {
        try {
            outputProcessorChain.reset();
            outputProcessorChain.processEvent(xmlSecEvent);
        } catch (XMLSecurityException e) {
            throw new XMLStreamException(e);
        } catch (XMLStreamException e) {
            String msg = e.getMessage();
            if (msg != null && msg.contains("Trying to declare prefix xmlns (illegal as per NS 1.1 #4)")) {
                throw new XMLStreamException("If you hit this exception this most probably means" +
                        "you are using the javax.xml.transform.stax.StAXResult. Don't use " +
                        "it. It is buggy as hell.", e);
            }
            //NB1: net.java.dev.stax-utils also doesn work: [Fatal Error]
            // :4:425: Attribute "xmlns" was already specified for element ...
View Full Code Here

TOP

Related Classes of javax.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.