diff options
author | Mike Hommey <mh@glandium.org> | 2004-09-10 05:26:00 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-09-10 05:26:00 +0000 |
commit | 09deb06614c3408ec0816a3c88920138bae2083c (patch) | |
tree | a1b841a7dc28eecb98ca361c9371ecd1449a1908 /doc/tutorial/apd.html | |
parent | c14c53a3645d81281058d4bb4cff24fa8d6faf33 (diff) | |
download | libxml2-09deb06614c3408ec0816a3c88920138bae2083c.tar.gz |
Load /tmp/tmp.BmUFjT/libxml2-2.6.13 intoupstream/2.6.13
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'doc/tutorial/apd.html')
-rw-r--r-- | doc/tutorial/apd.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/tutorial/apd.html b/doc/tutorial/apd.html index 30a69d9..8f9618d 100644 --- a/doc/tutorial/apd.html +++ b/doc/tutorial/apd.html @@ -23,12 +23,21 @@ getnodeset (xmlDocPtr doc, xmlChar *xpath){ xmlXPathObjectPtr result; context = xmlXPathNewContext(doc); + if (context == NULL) { + printf("Error in xmlXPathNewContext\n"); + return NULL; + } result = xmlXPathEvalExpression(xpath, context); + xmlXPathFreeContext(context); + if (result == NULL) { + printf("Error in xmlXPathEvalExpression\n"); + return NULL; + } if(xmlXPathNodeSetIsEmpty(result->nodesetval)){ + xmlXPathFreeObject(result); printf("No result\n"); return NULL; } - xmlXPathFreeContext(context); return result; } int @@ -63,6 +72,5 @@ main(int argc, char **argv) { xmlCleanupParser(); return (1); } - </pre><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ape.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C. Code for Keyword Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> E. Code for Add Keyword Example</td></tr></table></div></body></html> |