docs: public static CmsXmlGroupContainer unmarshal(CmsObject cms, CmsFile file, boolean keepEncoding)
      throws CmsXmlException {
  
          // check the cache
          CmsXmlGroupContainer content = getCache(cms, file, keepEncoding);
          if (content != null) {
              return content;
          }
  
          // not found in cache, read as normally
          byte[] contentBytes = file.getContents();
          String filename = cms.getSitePath(file);
  
          String encoding = null;
          try {
              encoding = cms.readPropertyObject(
                  filename,
                  CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING,
                  true).getValue();
          } catch (CmsException e) {
              // encoding will be null
          }
          if (encoding == null) {
              encoding = OpenCms.getSystemInfo().getDefaultEncoding();
          } else {
              encoding = CmsEncoder.lookupEncoding(encoding, null);
              if (encoding == null) {
                  throw new CmsXmlException(Messages.get().container(Messages.ERR_XMLCONTENT_INVALID_ENC_1, filename));
              }
          }
  
          if (contentBytes.length > 0) {
              // content is initialized
              if (keepEncoding) {
                  // use the encoding from the content
                  content = unmarshal(cms, contentBytes, encoding, new CmsXmlEntityResolver(cms));
              } else {
                  // use the encoding from the file property
                  // this usually only triggered by a save operation
                  try {
                      String contentStr = new String(contentBytes, encoding);
                      content = unmarshal(cms, contentStr, encoding, new CmsXmlEntityResolver(cms));
                  } catch (UnsupportedEncodingException e) {
                      // this will not happen since the encoding has already been validated
                      throw new CmsXmlException(
                          Messages.get().container(Messages.ERR_XMLCONTENT_INVALID_ENC_1, filename));
                  }
              }
          } else {
              // content is empty
              content = new CmsXmlGroupContainer(
                  cms,
                  DocumentHelper.createDocument(),
                  encoding,
                  new CmsXmlEntityResolver(cms));
          }
  
          // set the file
          content.setFile(file);
          // call prepare for use content handler and return the result
          CmsXmlGroupContainer xmlGroupContainer = (CmsXmlGroupContainer)content.getHandler().prepareForUse(cms, content);
  
          // set the cache
          setCache(cms, xmlGroupContainer, keepEncoding);
  
          return xmlGroupContainer;
      }