Example usage for org.springframework.util.xml StaxUtils createXMLReader

List of usage examples for org.springframework.util.xml StaxUtils createXMLReader

Introduction

In this page you can find the example usage for org.springframework.util.xml StaxUtils createXMLReader.

Prototype

public static XMLReader createXMLReader(XMLEventReader eventReader) 

Source Link

Document

Create a SAX XMLReader that reads from the given StAX XMLEventReader .

Usage

From source file:org.springframework.oxm.xmlbeans.XmlBeansMarshaller.java

@Override
protected final Object unmarshalXmlEventReader(XMLEventReader eventReader) throws XmlMappingException {
    XMLReader reader = StaxUtils.createXMLReader(eventReader);
    try {/*from  w  ww  .  j a va2 s .co  m*/
        return unmarshalSaxReader(reader, new InputSource());
    } catch (IOException ex) {
        throw convertXmlBeansException(ex, false);
    }
}