XmlWriter writeEntity(String name) throws IOException {
        closeOpeningTag(true);
        this.closed = false;
        for (int tabIndex = 0; tabIndex < stack.size() + indentingOffset; tabIndex++)
            this.writer.write(INDENT_STRING);
        this.writer.write("<");
        this.writer.write(name);
        stack.add(name);
        this.empty = true;
        this.justWroteText = false;
        return this;
    }