code: public static Comment toComment(Document doc, Object o) throws PageException {
  	if (o instanceof Comment) return (Comment) o;
  	else if (o instanceof CharacterData) return doc.createComment(((CharacterData) o).getData());
  	return doc.createComment(Caster.toString(o));
      }
docs: casts a value to a XML Comment Object
  
  @param doc XML Document
  @param o Object to cast
  @return XML Comment Object
  @throws PageException