code: @Override
      public Document fromString(String xml) throws IOException {
          ByteArrayInputStream stream = null;
          try {
              stream = new ByteArrayInputStream(xml.getBytes(Charsets.UTF_8));
              return fromInputStream(
                      stream,
                      Charsets.UTF_8
              );
          } catch (UnsupportedEncodingException e) {
              throw new IOException(e);
          } finally {
              IOUtils.closeQuietly(stream);
          }
      }
docs: Builds a new XML Document from the given (xml) string.
  By default this method uses UTF-8. If your document does not use UTF-8,
  use {@link #fromInputStream(java.io.InputStream, java.nio.charset.Charset)} that let you set the encoding.
  
  @param xml the xml to parse, must not be {@literal null}
  @return the document
  @throws java.io.IOException if the given string is not a valid XML document