code: protected void doLoadNextFile() throws CmsException {
  
          super.doLoadNextResource();
          if (m_resource == null) {
              return;
          }
  
          // upgrade the resource to a file
          CmsFile file = m_cms.readFile(m_resource);
  
          // unmarshal the XML content from the resource, don't use unmarshal(CmsObject, CmsResource)
          // as no support for getting the historic version that has been cached by a CmsHistoryResourceHandler
          // will come from there!
          m_content = CmsXmlContentFactory.unmarshal(m_cms, file, pageContext.getRequest());
  
          // check if locale is available
          m_contentLocale = m_locale;
          if (!m_content.hasLocale(m_contentLocale)) {
              Iterator<Locale> it = OpenCms.getLocaleManager().getDefaultLocales().iterator();
              while (it.hasNext()) {
                  Locale locale = it.next();
                  if (m_content.hasLocale(locale)) {
                      // found a matching locale
                      m_contentLocale = locale;
                      break;
                  }
              }
          }
      }
docs: Load the next file name from the initialized list of file names.<p>
  
  @throws CmsException if something goes wrong