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: "Bradley S. Huffman" <hip AT a.cs.okstate.edu>
  • To: Laurent Bihanic <laurent.bihanic AT atosorigin.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] The mysterious LeafNode class
  • Date: Fri, 20 Sep 2002 09:11:31 -0500

My reason would be that children have order so previous and next make
sense. Attributes are unordered so previous and next don't. BTW, I did
this with a experimental version of JDOM and to me it just wasn't that
usefull and one method to obtain a List or array of attributes was
good enough.

Brad

Laurent Bihanic writes:

>
> 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
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest




Archive powered by MHonArc 2.6.24.

Top of Page