code: protected void prepareToAddChildNode() throws IOException {
  		// reject modification of already closed document
  		if(isOpen==false) {
  			throw new IOException("Attempting to write to a closed document!");
  		}
  		// close previous tag, if applicable
  		if(lastChildNode!=null) {
  			lastChildNode.close();
  			lastChildNode = null;
  		}
  		writer.write("\n");
  	}
docs: Internal abstraction method;
  prepares the document for inserting a new child tag of any type.