code: public static <T> List<T> unmarshalCollection(Class<T> cl, Source s) throws JAXBException {
      JAXBContext ctx = JAXBContext.newInstance(JAXBCollection.class, cl);
      Unmarshaller u = ctx.createUnmarshaller();
      JAXBCollection<T> collection = u.unmarshal(s, JAXBCollection.class).getValue();
      return collection.getItems();
    }
docs: Converts the contents of the Source to a List with objects of the given class.
  
  @param cl Type to be used
  @param s Input
  @return List with objects of the given type