[xml] Load Xml file issue.



Hi,

Using the Attached file, and the below code, xmlXPathNodeSetGetLength is always returning 0.

doc = xmlReadFile("/tmp/AttrTest.xml", NULL, 0);
xmlXPathContextPtr ctxt = xmlXPathNewContext(doc);
xmlXPathObjectPtr pReturn = xmlXPathEval( (xmlChar*)"/string", ctxt);
int l = xmlXPathNodeSetGetLength(pReturn->nodesetval);
(omitted error checks and cleanup)

Can some tell me what is wrong?

Best Regards
Alistair Leslie-Hughes


Attachment: AttrTest.xml
Description: Text Data



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