Package javax.xml.stream

Examples of javax.xml.stream.XMLInputFactory.createXMLEventReader()


                public void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException {
                    log.warn(message + " errorType: " + errorType + " relatedInfo: " + relatedInformation);
                }
            });

            xmlReader = xif.createXMLEventReader(inputStream);

            XMLEvent docStart = xmlReader.nextEvent();

            XMLEvent rootElement = xmlReader.nextTag();
View Full Code Here


     */
    @Deprecated
    public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(IOHelper.buffered(in));
        } finally {
            returnXMLInputFactory(factory);
        }
    }

View Full Code Here

    @Converter
    public XMLEventReader createXMLEventReader(InputStream in, Exchange exchange) throws XMLStreamException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(IOHelper.buffered(in), IOHelper.getCharsetName(exchange));
        } finally {
            returnXMLInputFactory(factory);
        }
    }
View Full Code Here

    @Converter
    public XMLEventReader createXMLEventReader(File file, Exchange exchange) throws XMLStreamException, FileNotFoundException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(IOHelper.buffered(new FileInputStream(file)), IOHelper.getCharsetName(exchange));
        } finally {
            returnXMLInputFactory(factory);
        }
    }
View Full Code Here

    @Converter
    public XMLEventReader createXMLEventReader(Reader reader) throws XMLStreamException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(IOHelper.buffered(reader));
        } finally {
            returnXMLInputFactory(factory);
        }
    }
View Full Code Here

    @Converter
    public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(reader);
        } finally {
            returnXMLInputFactory(factory);
        }
    }
View Full Code Here

            if (in instanceof DOMSource && !isWoodstox(factory)) {
                //FIXME - if not woodstox, this will likely not work well
                LOG.info("DOMSource is known to have issues with {0}. We suggest using Woodstox",
                         factory.getClass());
            }
            return factory.createXMLEventReader(in);
        } finally {
            returnXMLInputFactory(factory);
        }
    }
View Full Code Here

    public static void compare(String a, String b) throws Exception {
        StringBuilder message = new StringBuilder();
        XMLInputFactory factory = XMLInputFactory.newInstance();
        factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
        XMLEventReader rA = factory.createXMLEventReader(new StringReader(a));
        XMLEventReader rB = factory.createXMLEventReader(new StringReader(b));
        if (!compare(rA, rB, message)) {
            throw new Exception(message.toString());
        }
    }
View Full Code Here

    public static void compare(String a, String b) throws Exception {
        StringBuilder message = new StringBuilder();
        XMLInputFactory factory = XMLInputFactory.newInstance();
        factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
        XMLEventReader rA = factory.createXMLEventReader(new StringReader(a));
        XMLEventReader rB = factory.createXMLEventReader(new StringReader(b));
        if (!compare(rA, rB, message)) {
            throw new Exception(message.toString());
        }
    }
View Full Code Here

     */
    @Deprecated
    public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException {
        XMLInputFactory factory = getInputFactory();
        try {
            return factory.createXMLEventReader(IOHelper.buffered(in));
        } finally {
            returnXMLInputFactory(factory);
        }
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.