summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-11-11 12:53:54 +0000
committerMike Hommey <mh@glandium.org>2004-11-11 12:53:54 +0000
commitf51dd67f3a3f472af0620391eb588eeca4533689 (patch)
tree9184c396c489196608427d5fa35814e86a1e479f /doc/examples
parent9705f1a5e858108d21a0128556f42b25d16833cd (diff)
downloadlibxml2-f51dd67f3a3f472af0620391eb588eeca4533689.tar.gz
Load /tmp/tmp.n9GTkp/libxml2-2.6.16 intoupstream/2.6.16
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/examples.xml4
-rw-r--r--doc/examples/reader3.c4
-rw-r--r--doc/examples/testWriter.c4
-rw-r--r--doc/examples/tree1.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index 96534fc..bded118 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -100,7 +100,7 @@
<macro line='67' file='xmlversion' name='LIBXML_TEST_VERSION'/>
<enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
<function line='79' file='tree' name='xmlFreeDoc'/>
- <function line='67' file='parser' name='xmlParseFile'/>
+ <function line='67' file='parser' name='xmlReadFile'/>
<function line='74' file='tree' name='xmlDocGetRootElement'/>
</uses>
</example>
@@ -567,7 +567,6 @@
</symbol>
<symbol name='xmlParseFile'>
<ref filename='xpath1.c'/>
- <ref filename='tree1.c'/>
<ref filename='xpath2.c'/>
</symbol>
<symbol name='xmlParserCtxtPtr'>
@@ -576,6 +575,7 @@
</symbol>
<symbol name='xmlReadFile'>
<ref filename='parse1.c'/>
+ <ref filename='tree1.c'/>
</symbol>
<symbol name='xmlReadMemory'>
<ref filename='io1.c'/>
diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c
index 2da7532..acbff4f 100644
--- a/doc/examples/reader3.c
+++ b/doc/examples/reader3.c
@@ -15,7 +15,7 @@
#include <stdio.h>
#include <libxml/xmlreader.h>
-#ifdef LIBXML_READER_ENABLED
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
/**
* streamFile:
@@ -113,7 +113,7 @@ int main(int argc, char **argv) {
#else
int main(void) {
- fprintf(stderr, "XInclude support not compiled in\n");
+ fprintf(stderr, "Reader or Pattern support not compiled in\n");
exit(1);
}
#endif
diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c
index c5e9c39..e158f97 100644
--- a/doc/examples/testWriter.c
+++ b/doc/examples/testWriter.c
@@ -1168,8 +1168,8 @@ ConvertInput(const char *in, const char *encoding)
if (out != 0) {
temp = size - 1;
ret = handler->input(out, &out_size, (const xmlChar *) in, &temp);
- if (ret || temp - size + 1) {
- if (ret) {
+ if ((ret < 0) || (temp - size + 1)) {
+ if (ret < 0) {
printf("ConvertInput: conversion wasn't successful.\n");
} else {
printf
diff --git a/doc/examples/tree1.c b/doc/examples/tree1.c
index 8a303e2..8644cf1 100644
--- a/doc/examples/tree1.c
+++ b/doc/examples/tree1.c
@@ -64,10 +64,10 @@ main(int argc, char **argv)
LIBXML_TEST_VERSION
/*parse the file and get the DOM */
- doc = xmlParseFile(argv[1]);
+ doc = xmlReadFile(argv[1], NULL, 0);
if (doc == NULL) {
- printf("error: could not parse file file.xml\n");
+ printf("error: could not parse file %s\n", argv[1]);
}
/*Get the root element node */