Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Make DOMConverter methods public?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Make DOMConverter methods public?
  • Date: Fri, 18 Jul 2003 09:54:58 -0500

Elliotte Rusty Harold writes:

> At 5:35 PM -0700 7/17/03, Wolfgang Hoschek wrote:
>
> >What's the reason the DOMConverter.convert(xyz) methods are private?
> >It would be handy for my app to be able to convert a DOM element
> >into a XOM element, without going through the trouble of making new
> >documents and passing them to the public methods that work on entire
> >documents.
>
> You can't create a DOM element without creating DOM document, at
> least not within DOM. In DOM every element has a document object, and
> cannot be disassociated from that document. I suppose it might be
> possible to change a single DOM element to a single XOM element, but
> the reverse is not possible, within the limits of DOM.

So create a internal DOM document, then create the other node with it, and
return the node (which is associated with a DOM document). Users are still
going to have to call "importNode" to get any translated node into another
document.

Or better yet just have the methods that also take a DOM Document as
a parameter.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page