James wrote: >It could well be that a DocumentFragment >interface and default implementation may make sense.
I disagree. The org.dom4j.Branch interface behaves like a org.w3c.DocumentFragment with additional benefits (XPath). As James has pointed out, the org.dom4j.io.XMLWriter class is more than happy to write-out a Branch, therefore all of Luca's requirements (as described in previous message) can be satisfied with the current dom4j release. Dane Foster Equity Technology Group, Inc http://www.equitytg.com. 954.360.9800 ----- Original Message ----- From: "James Strachan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 10:59 AM Subject: Re: [dom4j-user] org.dom4j.DocumentFragment ??? ----- 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 _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
