Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] removeChild returns what?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Laurent Bihanic <laurent.bihanic AT atosorigin.com>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] removeChild returns what?
  • Date: Mon, 05 May 2003 10:37:58 +0200


Elliotte Rusty Harold wrote:
public void removeChild(int position)
public void removeChild(Node child)

+1 also I don't remember ever using such a feature. But it looks quite
convenient.

public Node removeChild(int position)
public Node removeChild(Node child)

+1 also I don't remember ever using such a feature. But it looks quite
convenient.

Second question: does it make sense for both methods to return the node removed? or just the one that removes by position? After all, when the method removes a specific child node, you must already have a reference to that node. Then again, it may be conceptually cleaner for both removeChild methods to return the same thing. Thoughts?

Yes, always return the removed node object.

Laurent






Archive powered by MHonArc 2.6.24.

Top of Page