48 |
/* Local function prototypes */ |
/* Local function prototypes */ |
49 |
|
|
50 |
xmlXPathContextPtr |
xmlXPathContextPtr |
51 |
xmljCreateXPathContextPtr (JNIEnv *env, xmlNodePtr node); |
xmljCreateXPathContextPtr (xmlNodePtr node); |
52 |
|
|
53 |
jobject |
jobject |
54 |
xmljGetXPathResult (JNIEnv *env, xmlXPathObjectPtr obj); |
xmljGetXPathResult (JNIEnv *env, xmlXPathObjectPtr obj); |
63 |
* Creates an XPath context for the given node. |
* Creates an XPath context for the given node. |
64 |
*/ |
*/ |
65 |
xmlXPathContextPtr |
xmlXPathContextPtr |
66 |
xmljCreateXPathContextPtr (JNIEnv *env, xmlNodePtr node) |
xmljCreateXPathContextPtr (xmlNodePtr node) |
67 |
{ |
{ |
68 |
xmlXPathContextPtr ctx; |
xmlXPathContextPtr ctx; |
69 |
|
|
160 |
|
|
161 |
JNIEXPORT jobject JNICALL |
JNIEXPORT jobject JNICALL |
162 |
Java_gnu_xml_libxmlj_dom_GnomeDocument_evaluate (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeDocument_evaluate (JNIEnv *env, |
163 |
jobject self, |
jobject self |
164 |
|
__attribute__((__unused__)), |
165 |
jstring expression, |
jstring expression, |
166 |
jobject contextNode, |
jobject contextNode, |
167 |
jobject resolver, |
jobject resolver, |
179 |
{ |
{ |
180 |
return NULL; |
return NULL; |
181 |
} |
} |
182 |
ctx = xmljCreateXPathContextPtr (env, node); |
ctx = xmljCreateXPathContextPtr (node); |
183 |
if (ctx != NULL) |
if (ctx != NULL) |
184 |
{ |
{ |
185 |
eval = xmlXPathEval (str, ctx); |
eval = xmlXPathEval (str, ctx); |
191 |
|
|
192 |
JNIEXPORT jobject JNICALL |
JNIEXPORT jobject JNICALL |
193 |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_init (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_init (JNIEnv *env, |
194 |
jobject self, |
jobject self |
195 |
|
__attribute__((__unused__)), |
196 |
jstring expression) |
jstring expression) |
197 |
{ |
{ |
198 |
const xmlChar *str; |
const xmlChar *str; |
206 |
|
|
207 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
208 |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_free (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_free (JNIEnv *env, |
209 |
jobject self, |
jobject self |
210 |
|
__attribute__((__unused__)), |
211 |
jobject ptr) |
jobject ptr) |
212 |
{ |
{ |
213 |
xmlXPathCompExprPtr expr; |
xmlXPathCompExprPtr expr; |
218 |
|
|
219 |
JNIEXPORT jobject JNICALL |
JNIEXPORT jobject JNICALL |
220 |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_doEvaluate (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeXPathExpression_doEvaluate (JNIEnv *env, |
221 |
jobject self, |
jobject self |
222 |
|
__attribute__((__unused__)), |
223 |
jobject ptr, |
jobject ptr, |
224 |
jobject contextNode, |
jobject contextNode, |
225 |
jshort type, |
jshort type, |
236 |
{ |
{ |
237 |
return NULL; |
return NULL; |
238 |
} |
} |
239 |
ctx = xmljCreateXPathContextPtr (env, node); |
ctx = xmljCreateXPathContextPtr (node); |
240 |
if (ctx != NULL) |
if (ctx != NULL) |
241 |
{ |
{ |
242 |
eval = xmlXPathCompiledEval (expr, ctx); |
eval = xmlXPathCompiledEval (expr, ctx); |
247 |
|
|
248 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
249 |
Java_gnu_xml_libxmlj_dom_GnomeXPathResult_free (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeXPathResult_free (JNIEnv *env, |
250 |
jobject self, |
jobject self |
251 |
|
__attribute__((__unused__)), |
252 |
jobject obj) |
jobject obj) |
253 |
{ |
{ |
254 |
xmlXPathFreeObject ((xmlXPathObjectPtr) xmljAsPointer (env, obj)); |
xmlXPathFreeObject ((xmlXPathObjectPtr) xmljAsPointer (env, obj)); |
458 |
} |
} |
459 |
} |
} |
460 |
xmlFree ((xmlChar *) s_name); |
xmlFree ((xmlChar *) s_name); |
461 |
ctx = xmljCreateXPathContextPtr (env, node); |
ctx = xmljCreateXPathContextPtr (node); |
462 |
if (ctx != NULL) |
if (ctx != NULL) |
463 |
{ |
{ |
464 |
eval = xmlXPathEval (expr, ctx); |
eval = xmlXPathEval (expr, ctx); |
561 |
} |
} |
562 |
xmlFree ((xmlChar *) s_uri); |
xmlFree ((xmlChar *) s_uri); |
563 |
xmlFree ((xmlChar *) s_localName); |
xmlFree ((xmlChar *) s_localName); |
564 |
ctx = xmljCreateXPathContextPtr (env, node); |
ctx = xmljCreateXPathContextPtr (node); |
565 |
if (ctx != NULL) |
if (ctx != NULL) |
566 |
{ |
{ |
567 |
eval = xmlXPathEval (expr, ctx); |
eval = xmlXPathEval (expr, ctx); |
572 |
|
|
573 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
574 |
Java_gnu_xml_libxmlj_dom_GnomeXPathNodeList_free (JNIEnv *env, |
Java_gnu_xml_libxmlj_dom_GnomeXPathNodeList_free (JNIEnv *env, |
575 |
jobject self, |
jobject self |
576 |
|
__attribute__((__unused__)), |
577 |
jobject obj) |
jobject obj) |
578 |
{ |
{ |
579 |
xmlXPathFreeObject ((xmlXPathObjectPtr) xmljAsPointer (env, obj)); |
xmlXPathFreeObject ((xmlXPathObjectPtr) xmljAsPointer (env, obj)); |