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

[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


<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.microsoft.com/MSCOM/Service/DownloadsSite/4.0";>4XD9RXS5</string>


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