code: private void newlineAndIndent(){
          if (isWriting()){
              if (isClosed){
                  write(Indentation.tabs(depth)); // \n\t\t\t\...
              } else {
                  depth++;
                  write(Indentation.closedTabs(depth)); // >\n\t\t\t\...
                  isClosed = true;
              }
          }
      }
docs: Adds a new line and indentation.
  Checks whether the parent element is still opened or not (!isClosed).
  If it is open then it closes the parent begin tag with ">" (!isClosed).