er = 
           javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... );
 
       Object o = u.unmarshal( xmlStreamReader );
    </pre>
 </blockquote>

 <p>
 Unmarshalling from a StAX XMLEventReader:
 <blockquote>
    <pre>
       JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
       Unmarshaller u = jc.createUnmarshaller();
 
       javax.xml.stream.XMLEventReader xmlEventReader = 
           javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... );
 