Package org.springframework.util.xml

Examples of org.springframework.util.xml.FixedXMLEventStreamReader


        this.tFactory.setErrorListener(new SimpleTransformErrorListener(LogFactory.getLog(getClass())));
       
        //Load the XML document so it reads the same way the rendering pipeline reads XML
        final XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
        final XMLEventReader eventReader = xmlInputFactory.createXMLEventReader(this.getClass().getResourceAsStream("test.xml"));
        final XMLStreamReader streamReader = new FixedXMLEventStreamReader(eventReader);
        xmlSource = new StAXSource(streamReader);
       
        xslTemplate = tFactory.newTemplates(new StreamSource(this.getClass().getResourceAsStream("test.xsl")));
       
        expected = IOUtils.toString(this.getClass().getResourceAsStream("result.xml"));
View Full Code Here


        final XMLEventReader eventReader = pipelineEventReader.getEventReader();
       
        //Wrap the event reader in a stream reader to avoid a JDK bug
        final XMLStreamReader streamReader;
        try {
            streamReader = new FixedXMLEventStreamReader(eventReader);
        }
        catch (XMLStreamException e) {
            throw new RuntimeException("Failed to create XMLStreamReader from XMLEventReader", e);
        }
        final Source xmlReaderSource = new StAXSource(streamReader);
View Full Code Here

            final Document document;
            try {
                XMLStreamReader xmlStreamReader = staxSource.getXMLStreamReader();
                if (xmlStreamReader == null) {
                    final XMLEventReader xmlEventReader = staxSource.getXMLEventReader();
                    xmlStreamReader = new FixedXMLEventStreamReader(xmlEventReader);
                }
               
                document = domConverter.buildDocument(xmlStreamReader);
            }
            catch (XMLStreamException e) {
View Full Code Here

TOP

Related Classes of org.springframework.util.xml.FixedXMLEventStreamReader

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.