docs: public static <T> T fromXml(String xml, Class<T> type) {
          if (xml == null || xml.trim().equals("")) {
              return null;
          }
          JAXBContext jc = null;
          Unmarshaller u = null;
          T object = null;
          try {
              jc = JAXBContext.newInstance(type);
              u = jc.createUnmarshaller();
              object = (T) u.unmarshal(new ByteArrayInputStream(xml.getBytes(ENCODING)));
          } catch (JAXBException e) {
              throw new RuntimeException(e);
          } catch (UnsupportedEncodingException e) {
              throw new RuntimeException(e);
          }
          return object;
      }