Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] simple questions

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] simple questions
  • Date: Tue, 13 Apr 2004 14:23:41 -0400

Elliotte Rusty Harold scripsit:

> The second one avoids the cast, but otherwise one just calls the
> other. However, the copy() method has the option in a subclass to
> return an instance of the subclass instead of a pure Element. I doubt
> performance is an issue.

Hmm, this is troubling:

Element e1 = new SomeElementSubclass(...);
Element e2 = e1.copy();
anElement.appendChild(e1);
anotherElement.appendChild(e2);

might wind up attaching the (same) element to anotherElement and leaving
anElement with nothing?

--
John Cowan jcowan AT reutershealth.com http://www.ccil.org/~cowan
O beautiful for patriot's dream that sees beyond the years
Thine alabaster cities gleam undimmed by human tears!
America! America! God mend thine every flaw,
Confirm thy soul in self-control, thy liberty in law!
-- one of the verses not usually taught in U.S. schools




Archive powered by MHonArc 2.6.24.

Top of Page