[xml] question about xmlXPathCompile?
- From: "Yuan Ni" <niyuan gmail com>
- To: xml gnome org
- Subject: [xml] question about xmlXPathCompile?
- Date: Sat, 13 Jan 2007 15:46:50 +0800
Hi,
I have a problem using the function xmlXPathCompile in libxml2-2.2.26
In my code, I use the following code to convert a string str to the format in libxml,
::xmlXPathCompExpr* expr = ::xmlXPathCompile(BAD_CAST
str.c_str());
However, the compiled format is not correct.
Given the xpath _expression_ /nitf/body[head],
I have dumped the compiled format shown as follows :
XPE: /nitf/body[head]
libxml format:
[ 0 : -1 / -1 ] (the number 0 is the step no, -1/-1 corresponds ch1/ch2 in xmlXPathStepOp)
ROOT ( the op in xmlXPathStepOp, UPSUPPORTED-0 means the value is 0, and there is no such operator)
[ 1 : 11 / 0 ]
UNSUPPORTED-0
[ 2 : 0 / 9 ]
UNSUPPORTED-0
[ 3 : 0 / 0 ]
UNSUPPORTED-0
[ 4 : 0 / 0 ]
UNSUPPORTED-157540584
[ 5 : 0 / 0 ]
UNSUPPORTED-0
[ 6 : 0 / 0 ]
UNSUPPORTED-0
[ 7 : 0 / 0 ]
PLUS
The code is compiled in Fedora Core 6, using gcc-4.1.1. Does anybody know what is the problem here?
Thanks a lot.
Regards,
NiYuan
--
Regards!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]