private static void writeEolAndIndent(XMLStreamWriter writer, int indent) throws XMLStreamException {
    writer.writeCharacters("\n");
    for (int i = 0; i < indent; i++) {
      writer.writeCharacters("  ");
    }
  }
private static void writeEolAndIndent(XMLStreamWriter writer, int indent)