DOM_Element roElem = (DOM_Element&) NodeList.item(i); You might want to make SURE that the node returned is really an element before doing this. The cast is quite brutal, it will cast ANYTHING.
/ Erik -----Original Message----- From: Jorge Pozo Ramirez [mailto:[EMAIL PROTECTED]] Sent: den 18 december 2001 17:54 To: [EMAIL PROTECTED] Subject: Class Casting DOM_Element / DOM_Node Hi there. I have a DOM_Element, and I use getElementsByTagName(), so I get a DOM_NodeList. For each node within this list, I want to do another search like getElementsByTagName(), but as DOM_NodeList.item(i) returns a DOM_Node, (that lacks the getElementsByTagName() method), how can I cast the DOM_Node returned by NodeList.item(i) into a DOM_Element? Thanks. Jorge ********************************************************************** Este mensaje ha sido analizado con una herramienta de deteccion de virus para su seguridad. Ministerio de Justicia www.mju.es ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
