Hi!
I'm using default JDK 1.5 parser (xerces) to
1) parse a string into DOM
2) import some elements into another DOM
I experience strange bugs, such as disappearance of
element's contents. I could not trace this in debugger
cause it 100% works in debugger (and it 100% doesn't
work without it).
I found a workaround:
Element ins = ...
System.err.println ("TEXT: "+ins.getTextContent());
ins = (Element) doc.adoptNode(ins);
...
assertNotNull(ins.getTextContent());
I.e. commenting the println makes my tests fail because of
(getTextContent()==null); uncommenting the line makes
tests go.
I.e. accessing the element's contents before adopting
resolves the problem. Another (better) workaround is
//System.err.println ("TEXT: "+ins.getTextContent());
ins = (Element) doc.importNode(ins,true);
Seems to be a minor issue.
Just to let you know.
Victor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]