|
From: <pa...@at...> - 2005-07-20 02:56:58
|
I'm glad you mentioned the approach you took, because the code I had found
elsewhere and pasted into Node::Find()...
xmlNodePtr current_node=impl_
xmlNsPtr nsdefptr = current_node->nsDef;
if(nsdefptr != NULL) {
if(nsdefptr->prefix == NULL) {
xmlXPathRegisterNs(ctxt,
(const xmlChar *)"dummy",
nsdefptr->href);
}
}
Doesn't work after the first time. After it is executed successfully the first
time - all subsequent calls, through a variety of other node instances, fail the
conditional tests you see above.
Still, I figure there must be a more elegant way to modify libxml++ to handle
this issue. I say this because, it is really annoying to have to set the prefix
and namespace over, and over, and over, for each Node instance you obtain.
-Brent
|