Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.0d23 Last Call

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT ccil.org>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.0d23 Last Call
  • Date: Mon, 2 Feb 2004 19:33:41 -0500

Elliotte Rusty Harold scripsit:

> OK. I think I see. It's basically a replace method, right? And it
> differs from insert in that it doesn't shift the position of the
> other nodes?

Correct.

> I'll need to think about this more deeply when my brain is less fuzzy
> than it is now. To be honest, I wasn't incredibly thrilled by adding
> insert and remove, but they turned out to be very useful for XInclude.

The utility of this is that it lets people construct their own Nodes
objects and stuff their own nodes in them as they please. You can use
it as a queue or stack of nodes, or you can have a method that accepts
a Nodes argument, does something with each node, and replaces it with
a new node.

Similar tricks can be played with Element if putChild and putAttribute
are added; they have the same semantics as Node.put.

Essentially, Nodes and Element can function as useful collection classes
for specialized content.

--
"By Elbereth and Luthien the Fair, you shall jcowan AT reutershealth.com
have neither the Ring nor me!" --Frodo http://www.ccil.org/~cowan




Archive powered by MHonArc 2.6.24.

Top of Page