code: private void writeSeverity(Severity severity) throws XMLStreamException {
          xmlStreamWriter.writeStartElement("severity");
          xmlStreamWriter.writeAttribute("level", severity.getLevel().toString());
          xmlStreamWriter.writeCharacters(severity.getValue());
          xmlStreamWriter.writeEndElement();
      }
docs: Writes the severity of the rule.
  
  @param severity
  The severity the rule has been executed with
  @throws XMLStreamException
  If writing fails.