xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Bradley S. Huffman" <hip AT a.cs.okstate.edu>
- To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] prefixChild?
- Date: Sun, 04 May 2003 10:19:03 -0500
Elliotte Rusty Harold writes:
> While clearing out some old TODO items, I noticed one interesting idea.
> Should there be a prefixChild() method in ParentNode to complement
> appendChild()?
appendChild is good because without it you'd have to first ask if the parent
has any children and how many. Which is what happens internally, but
appendChild is such a clean and obvious one liner. I don't have any numbers
to back it up, but I'm guessing appendChild is the method used 90% of the
time for adding content, so it makes a good convenience method.
Inserting anywhere else in the list, including the front, you already know
the index you want and insertChild(index, node) provides a nice obvious one
liner, IMHO. -1 from me for a convenience method to add to the front of the
list.
Brad
-
[XOM-interest] prefixChild?,
Elliotte Rusty Harold, 05/04/2003
-
Re: [XOM-interest] prefixChild?,
John Cowan, 05/04/2003
- Re: [XOM-interest] prefixChild?, Elliotte Rusty Harold, 05/04/2003
- Re: [XOM-interest] prefixChild?, Bradley S. Huffman, 05/04/2003
- Re: [XOM-interest] prefixChild?, Laurent Bihanic, 05/05/2003
-
Re: [XOM-interest] prefixChild?,
Elliotte Rusty Harold, 05/05/2003
- Re: [XOM-interest] prefixChild?, John Cowan, 05/05/2003
- <Possible follow-up(s)>
- RE: [XOM-interest] prefixChild?, Womick, Don, 05/05/2003
- Re: [XOM-interest] prefixChild?, Laurent Bihanic, 05/05/2003
-
Re: [XOM-interest] prefixChild?,
John Cowan, 05/04/2003
Archive powered by MHonArc 2.6.24.