http://dom4j.org/xref/org/dom4j/tree/AbstractNode.html#93
Many of the createCopy() methods seem to depend on clone(), so this might be your problem.
christian.
On Jun 8, 2004, at 12:46 PM, Joel Rosi-Schwartz wrote:
On Tuesday 08 June 2004 17:19, Christian Niles wrote:Hi Joel,
I may have to code my own DocumentFactory as well in the near future, so I'm interested in your problem, but don't have an answer for you.
Can you tell us which interfaces you've implemented yourself, such as Element, Document, etc? You might compare your own implementations to the code found in the AbstractXXX and DefaultXXX classes. There are also a varierty of other implementations that I've looked at in the past for some insight.
For my EtishDocumentFactory itself I have simply extend
org.dom4j.DocumentFactory and overrode the various createElement(...)
methods. For my custom model classes I have started by extending
org.dom4j.tree.BaseElement. I depend on BaseElement for all of the dom4j
functionality and have only overrode hashCode(), equals() and all importantly
getDocumentFactory(). The true purpose of my costome classes are to implement
application specific behaviour. It all works out beautifully except for my
createCopy/clone problems.
Hope that helps you some.
- joel
The cross-reference pages are great for easy browsing:
http://dom4j.org/xref/index.html
best of luck, christian.
On Jun 8, 2004, at 12:05 PM, Joel Rosi-Schwartz wrote:Hi,
I posted this problem on the user's list and have not had a reply. My apologies for posting it again here, but this is really rather a show stopper for me.
I have created a custom DocumentFactory implementation to support my
application's model. All works fine except for when I try to use either
createCopy() or clone(). Essentially I just get the original element
returned. I guess I am missing something. What do I need to do either
in my
DocumentFactory class or my model classes to get the proper support
for these
methods?
Btw, are there any reference material, examples or how-to on creating and using a custom DocumentFactory to implement custom classes?
By the way thanks a lot for the great system. I have been using dom4j
extensively for the past three years and this is first support request
I have
made. That says an awful lot the both the quality of dom4j and the
thoughtfulness of the api.
Cheers, Joel
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev
------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev