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: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: John Cowan <cowan AT ccil.org>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] simple questions
  • Date: Tue, 13 Apr 2004 14:47:17 -0400

At 2:23 PM -0400 4/13/04, John Cowan wrote:

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?


I don't see how. Even if copy() returned this, the second appendChild call would throw a MultipleParentException. Or were you thinking of something else?
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page