docs: private void convertOldDocument() {
  
          Document newDocument = DocumentHelper.createDocument();
          Element root = newDocument.addElement(NODE_PAGES);
          root.add(I_CmsXmlSchemaType.XSI_NAMESPACE);
          root.addAttribute(I_CmsXmlSchemaType.XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION, XMLPAGE_XSD_SYSTEM_ID);
  
          Map<String, Element> pages = new HashMap<String, Element>();
  
          if ((m_document.getRootElement() != null) && (m_document.getRootElement().element(NODE_ELEMENTS) != null)) {
              for (Iterator<Element> i = CmsXmlGenericWrapper.elementIterator(
                  m_document.getRootElement().element(NODE_ELEMENTS),
                  NODE_ELEMENT); i.hasNext();) {
  
                  Element elem = i.next();
                  try {
                      String elementName = elem.attributeValue(ATTRIBUTE_NAME);
                      String elementLang = elem.attributeValue(ATTRIBUTE_LANGUAGE);
                      String elementEnabled = elem.attributeValue(ATTRIBUTE_ENABLED);
                      boolean enabled = (elementEnabled == null) ? true : Boolean.valueOf(elementEnabled).booleanValue();
  
                      Element page = pages.get(elementLang);
                      if (page == null) {
                          // no page available for the language, add one
                          page = root.addElement(NODE_PAGE).addAttribute(ATTRIBUTE_LANGUAGE, elementLang);
                          pages.put(elementLang, page);
                      }
  
                      Element newElement = page.addElement(NODE_ELEMENT).addAttribute(ATTRIBUTE_NAME, elementName);
                      if (!enabled) {
                          newElement.addAttribute(ATTRIBUTE_ENABLED, String.valueOf(enabled));
                      }
                      Element links = elem.element(NODE_LINKS);
                      if (links != null) {
                          newElement.add(links.createCopy());
                      }
                      Element content = elem.element(NODE_CONTENT);
                      if (content != null) {
                          newElement.add(content.createCopy());
                      }
  
                  } catch (NullPointerException e) {
                      LOG.error(Messages.get().getBundle().key(Messages.ERR_XML_PAGE_CONVERT_CONTENT_0), e);
                  }
              }
          }
  
          // now replace the old with the new document
          m_document = newDocument;
      }