docs: def validate_xml(file):
      """Validate an XML file."""
      max_file_size = current_app.config.get(
          'PREVIEWER_MAX_FILE_SIZE_BYTES', 1 * 1024 * 1024)
      if file.size > max_file_size:
          return False
  
      with file.open() as fp:
          try:
              content = fp.read().decode('utf-8')
              xml.dom.minidom.parseString(content)
              return True
          except:
              return False