[xml] XPointer with libxml 2.5.10 on win32

Title: Message
I have the following simplified XML tree
    <installation id='121'>
        <customer name='foo'/>
    <installation id='25'>
        <customer name='bar'/>
I have a function which manage an 'installation' node and I'm trying to get customer name with XPointer with the following code:
void ManageInstallation (xmlDocPtr doc, xmlNodePtr pnode)
 xmlXPathContextPtr context;
 xmlXPathObjectPtr result;
 context = xmlXPtrNewContext(doc, pnode, NULL);
 if (!context) return;
 xmlChar *_expression_ = BAD_CAST "customer name";
 result = xmlXPtrEval(_expression_, context);
    if (!result) return;
 xmlChar * resultString = xmlXPathCastToString(result);
     if (resultString) {
 printf("%s\n", resultString); /* utf8 */
the problem is that result is NULL even if I call xmlXPtrNewContext(doc, NULL, NULL)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]