code: public void setContents(ArrayList contents) {
  		this.contents = contents;
  		containsMarkupText = false;
  		containsSingleString = false;
  		Iterator i = contents.iterator();
  
  		while (i.hasNext()) {
  			Object o = i.next();
  			if (!(o instanceof Node)) {
  				if (o instanceof String && o.toString().trim().length() > 0) {
  					if (contents.size() == 1) {
  						containsSingleString = true;
  					} else {
  						containsSingleString = false;
  						containsMarkupText = true;
  					}
  				}
  			} else {
  				Node node = (Node) o;
  //				node.setDepth(depth + 1);
  				node.parentNode = this instanceof Node ? (Node) this : null;
  			}
  		}
  	}
docs: Replaces the contents (subnodes and text) of this node by new contents
  
  @param contents