code: public static Element toElement(Document doc, Object o) throws PageException {
  	if (o instanceof Element) return (Element) o;
  	else if (o instanceof Node) throw new ExpressionException("Object " + Caster.toClassName(o) + " must be a XML Element");
  	return doc.createElement(Caster.toString(o));
      }
docs: casts a value to a XML Element
  
  @param doc XML Document
  @param o Object to cast
  @return XML Element Object
  @throws PageException