code: private List<?> loadDataFromXml(String xml, Class<?> cls) {
          logger.entering(new Object[] { xml, cls });
          Preconditions.checkArgument(cls != null, "Please provide a valid type.");
          List<?> returned;
  
          try {
              JAXBContext context = JAXBContext.newInstance(Wrapper.class, cls);
              Unmarshaller unmarshaller = context.createUnmarshaller();
              StringReader xmlStringReader = new StringReader(xml);
              StreamSource streamSource = new StreamSource(xmlStringReader);
              Wrapper<?> wrapper = unmarshaller.unmarshal(streamSource, Wrapper.class).getValue();
              returned = wrapper.getList();
          } catch (JAXBException excp) {
              logger.exiting(excp.getMessage());
              throw new DataProviderException("Error unmarshalling XML string.", excp);
          }
  
          logger.exiting(returned);
          return returned;
      }
docs: Generates a list of the declared type after parsing the XML data string.
  
  @param xml
  String containing the XML data.
  @param cls
  The declared type modeled by the XML content.
  @return A {@link List} of object of declared type {@link XmlFileSystemResource#getCls()}.