code: private Component buildWholeFileDiffView(CmsObject cms, CmsFile file1, CmsFile file2) {
  
          String encoding = "UTF-8";
          try {
              CmsXmlContent content1 = CmsXmlContentFactory.unmarshal(cms, file1);
              encoding = content1.getEncoding();
          } catch (CmsException e) {
              String rootPath = file1.getRootPath();
              LOG.error(
                  "Could not unmarshal file " + rootPath + " for determining encoding: " + e.getLocalizedMessage(),
                  e);
          }
          String text1 = decode(file1.getContents(), encoding);
          String text2 = decode(file2.getContents(), encoding);
          CmsTextDiffPanel diffPanel = new CmsTextDiffPanel(text1, text2, false, true);
          return diffPanel;
  
      }
docs: Builds the diff view for the XML text.<p>
  
  @param cms the CMS context
  @param file1 the first file
  @param file2 the second file
  
  @return the diff view