RE: Removing a node??

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Kirk,

I guess you should look at what the Xerces implementation does in the 
removeChild() method.  Also, I wonder if you are confusing returning null 
to BTemplate with working directly on the DOM?  BTemplate does all the DOM 
stuff for you, so you shouldn't equate BTemplate style programming with 
direct DOM programming.  The more java-centric DOM frameworks such as 
Dom4j, JDOM, and XOM might actually allow for just setting a node to null, 
but you'd have to verify that for yourself.  Dom4j is a candidate for an 
alternate DOM implementation in XMLC-3.0, BTW.

Jake

At 05:01 PM 7/7/2003 +0200, you wrote:
>ok to answer my own question...
>
>this.reportButton.getParentNode().removeChild(this.reportButton);
>
>Still don't know why setting it to null didn't work though! ;)
>
>Regards
>KD
>
>-----Original Message-----
>From: Kirk Daries [mailto:[email protected]]
>Sent: 07 July 2003 04:48
>To: [email protected]
>Subject: [Barracuda] Removing a node??
>
>
>Hi Guys,
>
>Quick question?
>
>How does one remove a node from a xmlc document?
>I thought is was a simple mater of setting it to null...?
>But that doesn't seem to work...
>
>E.g.
>
>   public void processButtonNodes(HTMLObject xmlcPage, String pageEvent) {
>     this.reportButton = (HTMLButtonElement)
>xmlcPage.getElementById("reportPage");
>
>     if (this.removeReportButton == true) {
>       if (this.reportButton != null) {
>         this.reportButton = null;  // Doesn't seemt to work?
>         System.out.println("Setting reportButton to null.");
>       } else {
>         System.out.println("Node not found!!");
>       }
>     }
>
>     super.processButtonNodes(xmlcPage, pageEvent);
>   }
>
>
>Can someone clue me in?
>
>Thanx
>KD
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.