xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: "XOM" <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Siblings
- Date: Thu, 24 Oct 2002 05:03:37 -0400
I'm also thinking that getFirstChild should go:
public void Node getFirstChild()
This is very close to getChild(0). The only difference is that getChild(0) will throw an IndexOutOfBoundsException if the element is empty and getFirstChild() returns null. I've commented out this method in my working copy and it seems very easy to do without. I was able to replace getFirstChild() with getChild(0) essentially everywhere it was used.
Right now I'm leaning toward taking out these three methods and replacing them with an indexOf method in ParentNode. That would remove three methods apiece from about ten classes and add one method to three classes, a net savings of 27 methods, a significant simplification. :-)
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
-
[XOM-interest] Convenience methods for adding text in ParentNode,
Elliotte Rusty Harold, 10/20/2002
-
RE: [XOM-interest] Convenience methods for adding text in ParentNode,
Michael Fitzgerald, 10/22/2002
- RE: [XOM-interest] Convenience methods for adding text in ParentNode, Elliotte Rusty Harold, 10/22/2002
-
[XOM-interest] Siblings,
Elliotte Rusty Harold, 10/22/2002
-
Re: [XOM-interest] Siblings,
Bradley S. Huffman, 10/22/2002
- RE: [XOM-interest] Siblings, Hallvard Trętteberg, 10/23/2002
- Re: [XOM-interest] Siblings, Elliotte Rusty Harold, 10/24/2002
-
Re: [XOM-interest] Siblings,
Bradley S. Huffman, 10/22/2002
- RE: [XOM-interest] Convenience methods for adding text in ParentNode, Michael Fitzgerald, 10/22/2002
-
RE: [XOM-interest] Convenience methods for adding text in ParentNode,
Michael Fitzgerald, 10/22/2002
Archive powered by MHonArc 2.6.24.