Hi,
I have the following declarations:
xalanc_1_10::XalanDocument *xalan_document;
xercesc_2_7::DOMDocument *dom_document_;
I have these statements afterwards to initialize these:
xalan_document = parser_liaison_.parseXMLStream(input_source);
XalanNode* result = evaluator.selectSingleNode(
dom_support_,
xalan_document_,
XalanDOMString(xpath).c_str(),
prefix_resolver);
XercesParserLiaison xerces_parser_liaison;
XercesDocumentWrapper *document_wrapper =
xerces_parser_liaison.mapDocumentToWrapper(xerces_parser_liaison.createDocument(dom_document_,
true, true, true));
I want to get a DOMNode out of the XalanNode* result, but going by the
following method I get the Exception WRONG_DOCUMENT_ERR
const DOMNode *dom_node = (const DOMNode*)document_wrapper->mapNode(result);
since result if owned by xalan_document but the XercesDocumentWrapper was
created for dom_document which is a DOMDocument.
Statements like these give null:
XercesDocumentWrapper *document_wrapper =
xerces_parser_liaison.mapDocumentToWrapper(xalan_document)
Please tell me how should I go about to get a DOMNode out of the
XalanNode* result.
Thanks,
-Manoj