You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by T A <te...@yahoo.com> on 2004/12/06 20:19:51 UTC
Call to XercesDocumentWrapper method mapNode results in a pure virtual method called error
Hi,
I am trying to use the XercesDocumentWrapper method mapNode to convert a Xalan Node to a Xerces Node. The Xalan node is obtained from a NodeRefList object via the item method.
The code is aborting at the call to map node and I see an error message "pure virtual method called"
Below is a code fragment. I would appreciate any help. Am I missing some kind of macro declaration or object?
XALAN_CPP_NAMESPACE_USE
XALAN_USING_XERCES(XMLException)
XercesDOMSupport theDOMSupport;
try
{
if (nodeList)
{
DOMDocument* xercesDocument = sourceDocument->getDocument();
DOMNode* indexedNode;
XercesDocumentWrapper xalanDocument(xercesDocument);
const NodeRefList::size_type nodeListLength = nodeList->getLength();
ctrace << "Node List Length is" << nodeListLength << endl;
XalanNode* the_node = nodeList->item(index);
if(the_node)
indexedNode = (DOMNode*)(xalanDocument.mapNode(the_node));
Thanks,
Ted
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
Re: Call to XercesDocumentWrapper method mapNode results in a pure virtual method called error
Posted by T A <te...@yahoo.com>.
Well, what I am trying to do seems like it is a rather common operation from looking thru the archives, and following those examples I get this error.
Perhaps someone has some example of this kind of operation and can share it? It seems like a bit of overkill to have to go and file a bug report when I believe that is might just be an error in the way I am using the API, and not some kind of systemic problem
In fact here is the thread that I followed and it seems that it worked for that person
http://marc.theaimsgroup.com/?l=xalan-c-users&m=105887947932408&w=2
david_n_bertoni@us.ibm.com wrote:
Hi,
> I am trying to use the XercesDocumentWrapper method mapNode to convert
> a Xalan Node to a Xerces Node. The Xalan node is obtained from a
NodeRefList
> object via the item method.
>
> The code is aborting at the call to map node and I see an error message
"pure virtual method called"
>
> Below is a code fragment. I would appreciate any help. Am I missing some
kind of macro declaration or object?
A fragment can't help us figure out what's wrong. The best thing is to
create a small, standalone program that can reproduce the problem, open a
Jira bug report, and attach your sample program along with any data
necessary to run it.
Dave
---------------------------------
Do you Yahoo!?
The all-new My Yahoo! � What will yours do?
Re: Call to XercesDocumentWrapper method mapNode results in a pure virtual
method called error
Posted by da...@us.ibm.com.
Hi,
> I am trying to use the XercesDocumentWrapper method mapNode to convert
> a Xalan Node to a Xerces Node. The Xalan node is obtained from a
NodeRefList
> object via the item method.
>
> The code is aborting at the call to map node and I see an error message
"pure virtual method called"
>
> Below is a code fragment. I would appreciate any help. Am I missing some
kind of macro declaration or object?
A fragment can't help us figure out what's wrong. The best thing is to
create a small, standalone program that can reproduce the problem, open a
Jira bug report, and attach your sample program along with any data
necessary to run it.
Dave