|
List Info
Thread: how to use ::xmlXPathCompile
|
|
| how to use ::xmlXPathCompile |

|
2007-02-05 08:14:57 |
|
Hi, I have a problem of using the function : mlXPathCompile in Fedora Core 6 The code to use this function is as follows: : mlInitParser(); : mlXPathCompExpr* expr = : mlXPathCompile(from_string(argv[1]));
if(expr == NULL) printf("Error while parsing XPath expressionn");
printf("XPE: %sn", argv[1]); printf("nbStep=%d, maxStep=%d, last=%dn", expr->nbStep, expr->maxStep,expr->last);
printf("expr is %sn", expr->expr);
i passed the parameter "/nitf/head" to the function, but the return is as follows : XPE: /nitf/head nbStep = 0, maxStep = 10, last = -1
expr is (null)
The file main.cpp is compile as follows : g++ -c -D_REENTRANT -fPIC -I. -I/usr/include/libxml2 -c -w -O -DAPP_NO_THREADS -DXML_USE_NO_THREADS -o /home/niyuan/TestXPathParser/bin/obj/main.o /home/niyuan/TestXPathParser/src/main.cpp
g++ -D -fPIC -L/usr/lib /home/niyuan/TestXPathParser/bin/obj/main.o -o /home/niyuan/TestXPathParser/bin/TestXPathParser -L/usr/lib -lxml2 -lc -lstdc++ -lnsl
so what is the problem here? Thank you very much for the help!
Regards, Ni Yuan
|
| htmlParser C/C++ examples |
  Austria |
2007-02-07 13:07:31 |
|
| Hi all,
I'm looking for example sourcecode on how to fetch a html
file off the internet and then parse its contents using the libxml htmlParser
module. Can anyone help me out?
Many thanks,
Michael
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|