private void buildOutlineElement(Node node, String lineEnding, StringBuffer buf) {
		indent(node, buf);
		buf.append("<").append(ELEMENT_OUTLINE).append(" ");
		
		if (node.getCommentState() == Node.COMMENT_TRUE) {
			buf.append(ATTRIBUTE_IS_COMMENT).append("=\"true\" ");
		} else if (node.getCommentState() == Node.COMMENT_FALSE) {
			buf.append(ATTRIBUTE_IS_COMMENT).append("=\"false\" ");
		}
		
		if (node.getEditableState() == Node.EDITABLE_TRUE) {
			buf.append(ATTRIBUTE_IS_EDITABLE).append("=\"true\" ");
		} else if (node.getEditableState() == Node.EDITABLE_FALSE) {
			buf.append(ATTRIBUTE_IS_EDITABLE).append("=\"false\" ");
		}
		
		if (node.getMoveableState() == Node.MOVEABLE_TRUE) {
			buf.append(ATTRIBUTE_IS_MOVEABLE).append("=\"true\" ");
		} else if (node.getMoveableState() == Node.MOVEABLE_FALSE) {
			buf.append(ATTRIBUTE_IS_MOVEABLE).append("=\"false\" ");
		}
		
		buf.append(ATTRIBUTE_TEXT).append("=\"").append(escapeXMLAttribute(node.getValue())).append("\"");
		buildAttributes(node, buf);
		
		if (node.isLeaf()) {
			buf.append("/>").append(lineEnding);
		} else {
			buf.append(">").append(lineEnding);
			
			for (int i = 0, limit = node.numOfChildren(); i < limit; i++) {
				buildOutlineElement(node.getChild(i), lineEnding, buf);
			}
			
			indent(node, buf);
			buf.append("</").append(ELEMENT_OUTLINE).append(">").append(lineEnding);		
		}	
	}