Package com.ctc.wstx.exc

Examples of com.ctc.wstx.exc.WstxParsingException


        /* Otherwise need to verify that we are currently over START_ELEMENT.
         * Problem is we have already went past it...
         */
        if (mPrePeekEvent != START_ELEMENT) {
            throw new WstxParsingException
                (ErrorConsts.ERR_STATE_NOT_STELEM, evt.getLocation());
        }
        // ??? do we need to update mPrePeekEvent now

        String str = null;
        StringBuffer sb = null;

        /* Ok, fine, then just need to loop through and get all the
         * text...
         */
        for (; true; evt = nextEvent()) {
            if (evt.isEndElement()) {
                break;
            }
            int type = evt.getEventType();
            if (type == COMMENT || type == PROCESSING_INSTRUCTION) {
                // can/should just ignore them
                continue;
            }
            if (!evt.isCharacters()) {
                throw new WstxParsingException("Expected a text token, got "
                                               +ErrorConsts.tokenTypeDesc(type),
                                               evt.getLocation());
            }
            String curr = evt.asCharacters().getData();
            if (str == null) {
View Full Code Here


    }

    protected void throwParseError(String msg, Location loc)
        throws XMLStreamException
    {
        throw new WstxParsingException(msg, loc);
    }
View Full Code Here

    // @Override
    protected void throwStreamException(String msg, Location loc)
        throws XMLStreamException
    {
        if (loc == null) {
            throw new WstxParsingException(msg);
        }
        throw new WstxParsingException(msg, loc);
    }
View Full Code Here

     */

   public static void throwNotationException(NotationDecl oldDecl, NotationDecl newDecl)
        throws XMLStreamException
    {
        throw new WstxParsingException
            (MessageFormat.format(ErrorConsts.ERR_DTD_NOTATION_REDEFD,
                                  new Object[] {
                                  newDecl.getName(),
                                  oldDecl.getLocation().toString()}),
             newDecl.getLocation());
View Full Code Here

    }

   public static void throwElementException(DTDElement oldElem, Location loc)
        throws XMLStreamException
    {
        throw new WstxParsingException
            (MessageFormat.format(ErrorConsts.ERR_DTD_ELEM_REDEFD,
                                  new Object[] {
                                  oldElem.getDisplayName(),
                                  oldElem.getLocation().toString() }),
             loc);
View Full Code Here

    }

    private void throwParseError(String msg)
        throws WstxParsingException
    {
        throw new WstxParsingException(msg, getLastCharLocation());
    }
View Full Code Here

    // @Override
    protected void reportProblem(String msg, Location loc)
        throws XMLStreamException
    {
        throw new WstxParsingException(msg, loc);
    }
View Full Code Here

     */

   public static void throwNotationException(NotationDeclaration oldDecl, NotationDeclaration newDecl)
        throws XMLStreamException
    {
        throw new WstxParsingException
            (MessageFormat.format(ErrorConsts.ERR_DTD_NOTATION_REDEFD,
                                  new Object[] {
                                  newDecl.getName(),
                                  oldDecl.getLocation().toString()}),
             newDecl.getLocation());
View Full Code Here

    }

   public static void throwElementException(DTDElement oldElem, Location loc)
        throws XMLStreamException
    {
        throw new WstxParsingException
            (MessageFormat.format(ErrorConsts.ERR_DTD_ELEM_REDEFD,
                                  new Object[] {
                                  oldElem.getDisplayName(),
                                  oldElem.getLocation().toString() }),
             loc);
View Full Code Here

    // @Override
    protected void throwStreamException(String msg, Location loc)
        throws XMLStreamException
    {
        if (loc == null) {
            throw new WstxParsingException(msg);
        }
        throw new WstxParsingException(msg, loc);
    }
View Full Code Here

TOP

Related Classes of com.ctc.wstx.exc.WstxParsingException

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.