I have a problem removing a child node from a node. Specifically, I'm trying to remove an Element from a Document.
My code is:
Element elmt =doc.getElementById( id );
if( elmt == null ){
}
else{
Element discard = doc.removeChild(elmt);
}This gives me a compile error:
found : org.w3c.dom.Node
required: org.w3c.dom.Element
discard = doc.removeChild(elmt);
^
1 errorI don't understand this because elmt is an Element and not a Node, and Node is a superinterface of Element anyway.
Can anyone explain this? I am using Batik 1.1.1 and jdk1.3.1
Thanks.
Gordon.
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.486 / Virus Database: 284 - Release Date: 29/05/2003
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
