code: private XMLEventWriter createXmlEventWriter(FileWriter fileWriter)
              throws FactoryConfigurationError, XMLStreamException {
          XMLOutputFactory factory = XMLOutputFactory.newInstance();
          return new IndentingXMLEventWriter(factory
                  .createXMLEventWriter(fileWriter));
      }
docs: Create an XMLEventWriter for this file. Make it a pretty, indenting
  writer.