At 01.09 03/02/2007 +0100, you wrote:
Hello,
I overrid XercesDOMParser's startElement() method to attach user
data to each newly created DOMNode. This works fine, and I can
retreive the data later with getUserData().
However, I now merge two documents into one DOM, and I use
importNode() for copying the nodes into the main document,
collecting the nodes in a DocumentFragment first, and then adding
them to the main document with replaceChild().
a) The new nodes in the main document don't have the user data any more;
b) The data handler is not called while executing importNode().
However, it _is_ called when I delete the parser, when all nodes it
owns are deleted, which means that it should be properly registered.
Any clues what I could have done wrong here? I Use Xerces 2.7.0.
Uwe,
the code for importNode calls the NODE_IMPORTED handler (unless you
are cloning the entire document); can you verify if it invoked?
Cheers,
Uwe
P.S.: For some odd reason I never manage to debug into Xerces from
my application on my Windows XP/VS7.1 installation, although the PDB
and sources should be accessible; I compiled Xerces myself. Does
anyone have experience with this?
Is the PDB in the same folder of the Xerces DLL being loaded?
Alberto