Example usage for javax.xml.bind Unmarshaller unmarshal

List of usage examples for javax.xml.bind Unmarshaller unmarshal

Introduction

In this page you can find the example usage for javax.xml.bind Unmarshaller unmarshal.

Prototype

public Object unmarshal(javax.xml.stream.XMLEventReader reader) throws JAXBException;

Source Link

Document

Unmarshal XML data from the specified pull parser and return the resulting content tree.

Usage

From source file:org.jasig.portlet.blackboardvcportlet.dao.ws.impl.MultimediaWSDaoTest.java

@SuppressWarnings("unchecked")
private JAXBElement<BlackboardMultimediaResponseCollection> getSingleMultimedia() throws JAXBException {
    final JAXBContext context = JAXBContext.newInstance("com.elluminate.sas");
    final Unmarshaller unmarshaller = context.createUnmarshaller();
    JAXBElement<BlackboardMultimediaResponseCollection> response = (JAXBElement<BlackboardMultimediaResponseCollection>) unmarshaller
            .unmarshal(this.getClass()
                    .getResourceAsStream("/data/singleListRepositoryMultimediaResponseCollection.xml"));

    return response;
}