Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Re: [xml-dev] Underwhelmed (WAS: [xml-dev] XOM micro tutorial)

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: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Re: [xml-dev] Underwhelmed (WAS: [xml-dev] XOM micro tutorial)
  • Date: Wed, 25 Sep 2002 12:18:13 -0500

John Cowan writes:

> Elliotte Rusty Harold scripsit:
>
> > > Element auxroot = aux.getRootElement();
> > > aux.setRootElement(new Element("bogus"));
> > > holder.appendChild(auxroot);
> >
> > Yes, that should work. The main question is how to make the API
> > pretty, even if that's what we're doing behind the scenes.
>
> I suggest
>
> Element detachRootElement()
>
> which returns the old root and creates a new root named "XOM:bogus" or the
> li
> ke.

Or take the JDOM approach and throw a exception for any operation that follows
except for one's that would make it a well-formed document.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page