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));
}

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 ) ) ; }
casts a value to a xml element
