----- Original Message -----
From: <[EMAIL PROTECTED]>
>
> Essentially yes, the DocumentFragment would just be a collection of
> Elements.
> But would it not be nice if it also extended Node or Branch, so that you
> could use it anywhere you can use a Node. I would like to be able to pass
a
> DocumentFragment object to the write() method of XMLWriter, for example.

FWIW you can pass a List of Nodes into the write() method of XMLWriter.


> Also, in my application I need to manipulate Document and DocumentFragment
> objects through a common interface, which could be Branch, for example.

You could always use Object and test for either List or Node. Much of the
Jaxen code does similar things.

I'm just being devil's advocate here just trying to determine how useful a
DocumentFragment would be. It could well be that a DocumentFragment
interface and default implementation may make sense.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to