Package javax.xml.stream

Examples of javax.xml.stream.Location


    ////////////////////////////////////////////////////////
     */

    protected String getLocationDesc()
    {
        Location loc = getLocation();
        return (loc == null) ? null : loc.toString();
    }
View Full Code Here


        }

        // Either way, we do need to validate characters, and calculate hash
        ElementIdMap m = v.getIdMap();
        PrefixedName elemName = v.getElemName();
        Location loc = v.getLocation();
        ElementId id = m.addDefined(cbuf, start, (end - start + 1), hash,
                                    loc, elemName, mName);

        // We can detect dups by checking if Location is the one we passed:
        if (id.getLocation() != loc) {
View Full Code Here

    */

    public int getColumnNumber()
    {
        if (mScanner != null) {
            Location loc = mScanner.getLocation();
            return loc.getColumnNumber();
        }
        return -1;
    }
View Full Code Here

    }

    public int getLineNumber()
    {
        if (mScanner != null) {
            Location loc = mScanner.getLocation();
            return loc.getLineNumber();
        }
        return -1;
    }
View Full Code Here

    }

    public String getPublicId()
    {
        if (mScanner != null) {
            Location loc = mScanner.getLocation();
            return loc.getPublicId();
        }
        return null;
    }
View Full Code Here

    }

    public String getSystemId()
    {
        if (mScanner != null) {
            Location loc = mScanner.getLocation();
            return loc.getSystemId();
        }
        return null;
    }
View Full Code Here

    {
        String msg = cause.getMessage();
        if (msg == null) {
            return new XMLValidationException(cause);
        }
        Location loc = cause.getLocation();
        if (loc == null) {
            return new XMLValidationException(cause, msg);
        }
        return new XMLValidationException(cause, msg, loc);
    }
View Full Code Here

            --end;
        }

        // Ok; now start points to first, end to last char (both inclusive)
        ElementIdMap m = v.getIdMap();
        Location loc = v.getLocation();

        String idStr = null;
        StringBuilder sb = null;
        while (start <= end) {
            // Ok, need to check char validity, and also calc hash code:
View Full Code Here

            /* Hmmh. This is probably not an accurate location... but
             * we can't do much better as content we have has been
             * normalized already.
             */
            Location loc = rep.getLocation();
            // -1 to move it back after being advanced earlier (to skip trailing space)
            String lexical = new String(buf, start, (ptr-start-1));
            throw new TypedXMLStreamException(lexical, iae.getMessage(), loc, iae);
        } finally {
            mInputStart = ptr;
View Full Code Here

    protected void doReportProblem(XMLReporter rep, XMLValidationProblem prob)
        throws XMLStreamException
    {
        if (rep != null) {
            Location loc = prob.getLocation();
            if (loc == null) {
                loc = getLocation();
                prob.setLocation(loc);
            }
            // Backwards-compatibility fix: add non-null type, if missing:
View Full Code Here

TOP

Related Classes of javax.xml.stream.Location

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.