code: public void validateXmlStructure(EntityResolver resolver) throws CmsXmlException {
  
          if (m_file != null) {
              // file is set, use bytes from file directly
              CmsXmlUtils.validateXmlStructure(m_file.getContents(), resolver);
          } else {
              // use XML document - note that this will be copied in a byte[] array first
              CmsXmlUtils.validateXmlStructure(m_document, m_encoding, resolver);
          }
      }
docs: Validates the XML structure of the document with the DTD or XML schema used by the document.<p>
  
  This is required in case someone modifies the XML structure of a
  document using the "edit control code" option.<p>
  
  @param resolver the XML entity resolver to use
  @throws CmsXmlException if the validation fails