Hi,

Thanks for pointing that out!

The parser XercesParserLiaison was destroyed at another function exit.


Simon

David Bertoni wrote:
Simon Elbaz wrote:
Hi,
I am trying to build a DOMDocument from a DOMNode using getOwnerDocument. When I want to build the XalanDocument associated to the DOMDocument, the method XercesParserLiaison ::createDocument returns
pure virtual method called

Are you sure the DOMDocument instance has not been destroyed?  You don't
indicate how you created the document, but any parser that you use to
create the document will own it unless you call adoptDocument() on the
parser instance. If you don't do that, then the document will be destroyed
when the parser is destroyed.

Thanks for your help
Simon

Here is the used code:
...
/**********************************/
gdb output:

#5  0x410d1954 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
#6  0x410d1991 in std::terminate () from /usr/lib/libstdc++.so.5
#7  0x410d1ec8 in __cxa_pure_virtual () from /usr/lib/libstdc++.so.5
#8 0x40d1567e in xalanc_1_10::XercesDocumentWrapper::XercesDocumentWrapper ()
  from /usr/local/lib/libxalan-c.so.110
#9  0x40d15964 in xalanc_1_10::XercesDocumentWrapper::create ()
  from /usr/local/lib/libxalan-c.so.110
#10 0x40d1ff2d in xalanc_1_10::XercesParserLiaison::doCreateDocument ()
  from /usr/local/lib/libxalan-c.so.110
#11 0x40d20c02 in xalanc_1_10::XercesParserLiaison::createDocument ()
  from /usr/local/lib/libxalan-c.so.110
#12 0x4028da63 in foo (this=0xbf7ff174,
[EMAIL PROTECTED], paDomElement=0x80a68a8, paKeyElement=0xbf7feff4)
   at ExportableObject.cpp:146
You should build with symbols and find out what line of code in the
XercesDocumentWrapper constructor is being executed when the pure virtual
function is called.

Dave




Reply via email to