Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] The mysterious LeafNode class

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: John Cowan <jcowan AT reutershealth.com>, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] The mysterious LeafNode class
  • Date: Fri, 20 Sep 2002 10:25:21 +0200

Elliotte Rusty Harold wrote:
I could move some more stuff into Node. Most of the methods don't really make sense for attributes though. :-( getNextSibling() and getPreviousSibling() could be used for navigation from one attribute to the next. The child methods could behave pretty much the same as they do for leaf nodes. Maybe that makes sense.

It does make sense. Why allow navigating children using getFirstChild / getNextSibling and not providing it for Attributes?
I kinda like to have one way to do one thing, regardless the class, like the Iterator for all collections. I think XOM should provide the same navigation model for all lists. This does not require a common superinterface but just using the same method names and arguments.

Laurent





Archive powered by MHonArc 2.6.24.

Top of Page