* or after the first element has been closed
*/
public IXmlWriter closeElement() throws IOException {
if (elementNames.isEmpty()) {
if (elementsWritten) {
throw new OperationNotAllowedException("Root element has already been closed.");
} else {
throw new OperationNotAllowedException("Close called before an element has been opened.");
}
}
final CharSequence elementName = (CharSequence) elementNames.pop();
if (inElement) {
writer.write('/');