aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2008-08-29 12:43:40 +0000
committerDaniel Veillard <veillard@src.gnome.org>2008-08-29 12:43:40 +0000
commitcba68396ac4351a5c4451c483c3343a800d71beb (patch)
tree1edb7fb2c8fc3d101bf79a7861cc5b214cb083f8
parent0161e638c697890020c410dbedec9bb516d0fe49 (diff)
downloadandroid_external_libxml2-cba68396ac4351a5c4451c483c3343a800d71beb.tar.gz
android_external_libxml2-cba68396ac4351a5c4451c483c3343a800d71beb.tar.bz2
android_external_libxml2-cba68396ac4351a5c4451c483c3343a800d71beb.zip
a couple more fixes patch from Andreas Färber to compile on Haiku
* parser.c: a couple more fixes * nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku * doc/examples/*: regenerated daniel svn path=/trunk/; revision=3784
-rw-r--r--ChangeLog6
-rw-r--r--doc/examples/.cvsignore16
-rw-r--r--doc/examples/Makefile.am104
-rw-r--r--doc/examples/examples.xml464
-rw-r--r--nanoftp.c2
-rw-r--r--nanohttp.c4
-rw-r--r--parser.c8
7 files changed, 307 insertions, 297 deletions
diff --git a/ChangeLog b/ChangeLog
index 06d80650..756b8c57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Aug 29 14:41:38 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: a couple more fixes
+ * nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku
+ * doc/examples/*: regenerated
+
Thu Aug 28 17:31:46 CEST 2008 Daniel Veillard <daniel@veillard.com>
* parser.c include/libxml/parser.h: completely different fix for
diff --git a/doc/examples/.cvsignore b/doc/examples/.cvsignore
index 7097a62b..86efec4a 100644
--- a/doc/examples/.cvsignore
+++ b/doc/examples/.cvsignore
@@ -1,18 +1,18 @@
.memdump
Makefile.in
Makefile
-xpath2
-reader1
-reader4
-parse2
reader2
+xpath2
+xpath1
parse3
-reader3
-tree2
-parse4
io2
+tree2
+reader1
testWriter
+parse4
+reader3
io1
-xpath1
parse1
tree1
+reader4
+parse2
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index d1beee55..d0f42aac 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -15,75 +15,65 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
-EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res
+EXTRA_DIST=examples.xsl index.py test1.xml examples.xml test2.xml tst.xml writer.xml test3.xml tree2.res xpath1.res reader1.res reader3.res reader4.res io1.res xpath2.res io2.res tree1.res
-noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1
+noinst_PROGRAMS=reader2 xpath2 xpath1 parse3 io2 tree2 reader1 testWriter parse4 reader3 io1 parse1 tree1 reader4 parse2
+
+reader2_SOURCES=reader2.c
+reader2_LDFLAGS=
+reader2_DEPENDENCIES= $(DEPS)
+reader2_LDADD= @RDL_LIBS@ $(LDADDS)
xpath2_SOURCES=xpath2.c
xpath2_LDFLAGS=
xpath2_DEPENDENCIES= $(DEPS)
xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
-reader1_SOURCES=reader1.c
-reader1_LDFLAGS=
-reader1_DEPENDENCIES= $(DEPS)
-reader1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader4_SOURCES=reader4.c
-reader4_LDFLAGS=
-reader4_DEPENDENCIES= $(DEPS)
-reader4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse2_SOURCES=parse2.c
-parse2_LDFLAGS=
-parse2_DEPENDENCIES= $(DEPS)
-parse2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader2_SOURCES=reader2.c
-reader2_LDFLAGS=
-reader2_DEPENDENCIES= $(DEPS)
-reader2_LDADD= @RDL_LIBS@ $(LDADDS)
+xpath1_SOURCES=xpath1.c
+xpath1_LDFLAGS=
+xpath1_DEPENDENCIES= $(DEPS)
+xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
parse3_SOURCES=parse3.c
parse3_LDFLAGS=
parse3_DEPENDENCIES= $(DEPS)
parse3_LDADD= @RDL_LIBS@ $(LDADDS)
-reader3_SOURCES=reader3.c
-reader3_LDFLAGS=
-reader3_DEPENDENCIES= $(DEPS)
-reader3_LDADD= @RDL_LIBS@ $(LDADDS)
+io2_SOURCES=io2.c
+io2_LDFLAGS=
+io2_DEPENDENCIES= $(DEPS)
+io2_LDADD= @RDL_LIBS@ $(LDADDS)
tree2_SOURCES=tree2.c
tree2_LDFLAGS=
tree2_DEPENDENCIES= $(DEPS)
tree2_LDADD= @RDL_LIBS@ $(LDADDS)
-parse4_SOURCES=parse4.c
-parse4_LDFLAGS=
-parse4_DEPENDENCIES= $(DEPS)
-parse4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-io2_SOURCES=io2.c
-io2_LDFLAGS=
-io2_DEPENDENCIES= $(DEPS)
-io2_LDADD= @RDL_LIBS@ $(LDADDS)
+reader1_SOURCES=reader1.c
+reader1_LDFLAGS=
+reader1_DEPENDENCIES= $(DEPS)
+reader1_LDADD= @RDL_LIBS@ $(LDADDS)
testWriter_SOURCES=testWriter.c
testWriter_LDFLAGS=
testWriter_DEPENDENCIES= $(DEPS)
testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
+parse4_SOURCES=parse4.c
+parse4_LDFLAGS=
+parse4_DEPENDENCIES= $(DEPS)
+parse4_LDADD= @RDL_LIBS@ $(LDADDS)
+
+reader3_SOURCES=reader3.c
+reader3_LDFLAGS=
+reader3_DEPENDENCIES= $(DEPS)
+reader3_LDADD= @RDL_LIBS@ $(LDADDS)
+
io1_SOURCES=io1.c
io1_LDFLAGS=
io1_DEPENDENCIES= $(DEPS)
io1_LDADD= @RDL_LIBS@ $(LDADDS)
-xpath1_SOURCES=xpath1.c
-xpath1_LDFLAGS=
-xpath1_DEPENDENCIES= $(DEPS)
-xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
-
parse1_SOURCES=parse1.c
parse1_LDFLAGS=
parse1_DEPENDENCIES= $(DEPS)
@@ -94,41 +84,51 @@ tree1_LDFLAGS=
tree1_DEPENDENCIES= $(DEPS)
tree1_LDADD= @RDL_LIBS@ $(LDADDS)
+reader4_SOURCES=reader4.c
+reader4_LDFLAGS=
+reader4_DEPENDENCIES= $(DEPS)
+reader4_LDADD= @RDL_LIBS@ $(LDADDS)
+
+parse2_SOURCES=parse2.c
+parse2_LDFLAGS=
+parse2_DEPENDENCIES= $(DEPS)
+parse2_LDADD= @RDL_LIBS@ $(LDADDS)
+
valgrind:
$(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests')
@(echo > .memdump)
- @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
- @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
- @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
+ @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse2 test2.xml)
+ @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
+ @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./parse3)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./parse4 test3.xml)
- @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
+ @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
+ @($(CHECKER) ./parse4 test3.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
- @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
+ @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./parse1 test1.xml)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+ @($(CHECKER) ./parse2 test2.xml)
+ @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
index 2a0827b0..5f730943 100644
--- a/doc/examples/examples.xml
+++ b/doc/examples/examples.xml
@@ -1,4 +1,36 @@
<examples>
+ <example filename='reader2.c'>
+ <synopsis>Parse and validate an XML file with an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader2 &lt;valid_xml_filename&gt;</usage>
+ <test>reader2 test2.xml &gt; reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='45' file='xmlstring' name='xmlStrlen'/>
+ <function line='109' file='parser' name='xmlCleanupParser'/>
+ <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
+ <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/>
+ <enum line='70' file='parser' name='XML_PARSE_NOENT'/>
+ <function line='37' file='xmlreader' name='xmlTextReaderDepth'/>
+ <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/>
+ <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/>
+ <function line='84' file='xmlreader' name='xmlFreeTextReader'/>
+ <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='30' file='xmlreader' name='xmlTextReaderConstName'/>
+ <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/>
+ <function line='76' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='40' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
+ <function line='68' file='xmlreader' name='xmlReaderForFile'/>
+ <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/>
+ </uses>
+ </example>
<example filename='xpath2.c'>
<synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis>
<purpose>Shows how to make a full round-trip from a load/edit/save</purpose>
@@ -32,114 +64,42 @@
<typedef line='86' file='tree' name='xmlDocPtr'/>
</uses>
</example>
- <example filename='reader1.c'>
- <synopsis>Parse an XML file with an xmlReader</synopsis>
- <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
- <usage>reader1 &lt;filename&gt;</usage>
- <test>reader1 test2.xml &gt; reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
- <author>Daniel Veillard</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>xmlReader</section>
- <includes>
- <include>&lt;libxml/xmlreader.h&gt;</include>
- </includes>
- <uses>
- <function line='44' file='xmlstring' name='xmlStrlen'/>
- <function line='94' file='parser' name='xmlCleanupParser'/>
- <function line='37' file='xmlreader' name='xmlTextReaderNodeType'/>
- <typedef line='59' file='xmlreader' name='xmlTextReaderPtr'/>
- <function line='98' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='33' file='xmlreader' name='xmlTextReaderConstValue'/>
- <function line='36' file='xmlreader' name='xmlTextReaderDepth'/>
- <function line='69' file='xmlreader' name='xmlFreeTextReader'/>
- <macro line='89' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='29' file='xmlreader' name='xmlTextReaderConstName'/>
- <function line='40' file='xmlreader' name='xmlTextReaderHasValue'/>
- <function line='67' file='xmlreader' name='xmlTextReaderRead'/>
- <function line='39' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
- <function line='62' file='xmlreader' name='xmlReaderForFile'/>
- </uses>
- </example>
- <example filename='reader4.c'>
- <synopsis>Parse multiple XML files reusing an xmlReader</synopsis>
- <purpose>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
- <usage>reader4 &lt;filename&gt; [ filename ... ]</usage>
- <test>reader4 test1.xml test2.xml test3.xml &gt; reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp</test>
- <author>Graham Bennett</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>xmlReader</section>
- <includes>
- <include>&lt;libxml/xmlreader.h&gt;</include>
- </includes>
- <uses>
- <function line='99' file='tree' name='xmlFreeDoc'/>
- <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/>
- <function line='109' file='parser' name='xmlCleanupParser'/>
- <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='83' file='xmlreader' name='xmlReaderNewFile'/>
- <function line='104' file='xmlreader' name='xmlFreeTextReader'/>
- <macro line='72' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='26' file='xmlreader' name='xmlTextReaderRead'/>
- <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
- <function line='72' file='xmlreader' name='xmlReaderForFile'/>
- <typedef line='56' file='tree' name='xmlDocPtr'/>
- </uses>
- </example>
- <example filename='parse2.c'>
- <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
- <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose>
- <usage>parse2 test2.xml</usage>
- <test>parse2 test2.xml</test>
- <author>Daniel Veillard</author>
+ <example filename='xpath1.c'>
+ <synopsis>Evaluate XPath expression and prints result node set.</synopsis>
+ <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose>
+ <usage>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</usage>
+ <test>./xpath1 test3.xml &apos;//child2&apos; &gt; xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp</test>
+ <author>Aleksey Sanin</author>
<copy>see Copyright for the status of this software. </copy>
- <section>Parsing</section>
+ <section>XPath</section>
<includes>
- <include>&lt;libxml/tree.h&gt;</include>
<include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xpath.h&gt;</include>
+ <include>&lt;libxml/xpathInternals.h&gt;</include>
+ <include>&lt;libxml/tree.h&gt;</include>
</includes>
<uses>
- <function line='47' file='parser' name='xmlFreeParserCtxt'/>
- <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
- <function line='29' file='parser' name='xmlNewParserCtxt'/>
- <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
- <function line='35' file='parser' name='xmlCtxtReadFile'/>
- <function line='66' file='parser' name='xmlCleanupParser'/>
- <macro line='61' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='44' file='tree' name='xmlFreeDoc'/>
- <typedef line='26' file='tree' name='xmlDocPtr'/>
- <function line='70' file='xmlmemory' name='xmlMemoryDump'/>
- </uses>
- </example>
- <example filename='reader2.c'>
- <synopsis>Parse and validate an XML file with an xmlReader</synopsis>
- <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
- <usage>reader2 &lt;valid_xml_filename&gt;</usage>
- <test>reader2 test2.xml &gt; reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
- <author>Daniel Veillard</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>xmlReader</section>
- <includes>
- <include>&lt;libxml/xmlreader.h&gt;</include>
- </includes>
- <uses>
- <function line='45' file='xmlstring' name='xmlStrlen'/>
- <function line='109' file='parser' name='xmlCleanupParser'/>
- <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
- <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
- <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/>
- <enum line='70' file='parser' name='XML_PARSE_NOENT'/>
- <function line='37' file='xmlreader' name='xmlTextReaderDepth'/>
- <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/>
- <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/>
- <function line='84' file='xmlreader' name='xmlFreeTextReader'/>
- <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='30' file='xmlreader' name='xmlTextReaderConstName'/>
- <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/>
- <function line='76' file='xmlreader' name='xmlTextReaderRead'/>
- <function line='40' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
- <function line='68' file='xmlreader' name='xmlReaderForFile'/>
- <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/>
+ <enum line='229' file='tree' name='XML_ELEMENT_NODE'/>
+ <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='54' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='117' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='94' file='parser' name='xmlParseFile'/>
+ <function line='186' file='xpathInternals' name='xmlXPathRegisterNs'/>
+ <function line='129' file='xpath' name='xmlXPathFreeObject'/>
+ <variable line='193' file='globals' name='xmlFree'/>
+ <typedef line='218' file='tree' name='xmlNsPtr'/>
+ <function line='101' file='xpath' name='xmlXPathNewContext'/>
+ <function line='49' file='parser' name='xmlCleanupParser'/>
+ <macro line='43' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='130' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='39' file='parser' name='xmlInitParser'/>
+ <function line='156' file='xmlstring' name='xmlStrdup'/>
+ <function line='131' file='tree' name='xmlFreeDoc'/>
+ <function line='180' file='xmlstring' name='xmlStrchr'/>
+ <typedef line='206' file='tree' name='xmlNodePtr'/>
+ <typedef line='86' file='tree' name='xmlDocPtr'/>
+ <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
</uses>
</example>
<example filename='parse3.c'>
@@ -163,27 +123,27 @@
<typedef line='27' file='tree' name='xmlDocPtr'/>
</uses>
</example>
- <example filename='reader3.c'>
- <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
- <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
- <usage>reader3</usage>
- <test>reader3 &gt; reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test>
- <author>Daniel Veillard</author>
+ <example filename='io2.c'>
+ <synopsis>Output to char buffer</synopsis>
+ <purpose>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</purpose>
+ <usage>io2</usage>
+ <test>io2 &gt; io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp</test>
+ <author>John Fleck</author>
<copy>see Copyright for the status of this software. </copy>
- <section>xmlReader</section>
+ <section>InputOutput</section>
<includes>
- <include>&lt;libxml/xmlreader.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
</includes>
<uses>
- <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/>
- <function line='99' file='tree' name='xmlFreeDoc'/>
- <function line='65' file='xmlreader' name='xmlFreeTextReader'/>
- <function line='95' file='tree' name='xmlDocDump'/>
- <function line='51' file='xmlreader' name='xmlTextReaderRead'/>
- <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
- <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/>
- <function line='37' file='xmlreader' name='xmlReaderForFile'/>
- <typedef line='76' file='tree' name='xmlDocPtr'/>
+ <function line='29' file='tree' name='xmlNodeSetContent'/>
+ <function line='36' file='tree' name='xmlDocDumpFormatMemory'/>
+ <variable line='42' file='globals' name='xmlFree'/>
+ <function line='30' file='tree' name='xmlDocSetRootElement'/>
+ <typedef line='20' file='tree' name='xmlDocPtr'/>
+ <function line='43' file='tree' name='xmlFreeDoc'/>
+ <typedef line='19' file='tree' name='xmlNodePtr'/>
+ <function line='27' file='tree' name='xmlNewDoc'/>
+ <function line='28' file='tree' name='xmlNewNode'/>
</uses>
</example>
<example filename='tree2.c'>
@@ -200,9 +160,12 @@
</includes>
<uses>
<function line='75' file='tree' name='xmlNewText'/>
+ <function line='110' file='xmlmemory' name='xmlMemoryDump'/>
<function line='96' file='tree' name='xmlSaveFormatFileEnc'/>
<function line='78' file='tree' name='xmlAddChild'/>
<function line='41' file='tree' name='xmlDocSetRootElement'/>
+ <function line='105' file='parser' name='xmlCleanupParser'/>
+ <macro line='34' file='xmlversion' name='LIBXML_TEST_VERSION'/>
<function line='89' file='tree' name='xmlNewProp'/>
<function line='88' file='tree' name='xmlNewChild'/>
<function line='74' file='tree' name='xmlNewNode'/>
@@ -211,45 +174,32 @@
<function line='39' file='tree' name='xmlNewDoc'/>
</uses>
</example>
- <example filename='parse4.c'>
- <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
- <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
- <usage>parse4 test3.xml</usage>
- <test>parse4 test3.xml</test>
+ <example filename='reader1.c'>
+ <synopsis>Parse an XML file with an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader1 &lt;filename&gt;</usage>
+ <test>reader1 test2.xml &gt; reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
<author>Daniel Veillard</author>
<copy>see Copyright for the status of this software. </copy>
- <section>Parsing</section>
- <includes>
- <include>&lt;libxml/tree.h&gt;</include>
- <include>&lt;libxml/parser.h&gt;</include>
- </includes>
- <uses>
- <function line='94' file='parser' name='xmlFreeParserCtxt'/>
- <function line='86' file='parser' name='xmlParseChunk'/>
- <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
- <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
- <typedef line='47' file='tree' name='xmlDocPtr'/>
- </uses>
- </example>
- <example filename='io2.c'>
- <synopsis>Output to char buffer</synopsis>
- <purpose>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</purpose>
- <usage>io2</usage>
- <test>io2 &gt; io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp</test>
- <author>John Fleck</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>InputOutput</section>
+ <section>xmlReader</section>
<includes>
- <include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
</includes>
<uses>
- <function line='29' file='tree' name='xmlNodeSetContent'/>
- <function line='36' file='tree' name='xmlDocDumpFormatMemory'/>
- <variable line='42' file='globals' name='xmlFree'/>
- <function line='30' file='tree' name='xmlDocSetRootElement'/>
- <typedef line='19' file='tree' name='xmlNodePtr'/>
- <function line='27' file='tree' name='xmlNewDoc'/>
- <function line='28' file='tree' name='xmlNewNode'/>
+ <function line='44' file='xmlstring' name='xmlStrlen'/>
+ <function line='94' file='parser' name='xmlCleanupParser'/>
+ <function line='37' file='xmlreader' name='xmlTextReaderNodeType'/>
+ <typedef line='59' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='98' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='33' file='xmlreader' name='xmlTextReaderConstValue'/>
+ <function line='36' file='xmlreader' name='xmlTextReaderDepth'/>
+ <function line='69' file='xmlreader' name='xmlFreeTextReader'/>
+ <macro line='89' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='29' file='xmlreader' name='xmlTextReaderConstName'/>
+ <function line='40' file='xmlreader' name='xmlTextReaderHasValue'/>
+ <function line='67' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='39' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
+ <function line='62' file='xmlreader' name='xmlReaderForFile'/>
</uses>
</example>
<example filename='testWriter.c'>
@@ -271,6 +221,7 @@
<function line='925' file='xmlwriter' name='xmlTextWriterWriteComment'/>
<function line='1156' file='encoding' name='xmlFindCharEncodingHandler'/>
<variable line='1166' file='globals' name='xmlMalloc'/>
+ <typedef line='879' file='tree' name='xmlDocPtr'/>
<typedef line='341' file='tree' name='xmlBufferPtr'/>
<macro line='885' file='parser' name='XML_DEFAULT_VERSION'/>
<function line='901' file='tree' name='xmlDocSetRootElement'/>
@@ -282,6 +233,7 @@
<function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/>
<function line='1073' file='xmlwriter' name='xmlTextWriterWriteFormatElement'/>
<typedef line='1151' file='encoding' name='xmlCharEncodingHandlerPtr'/>
+ <function line='1131' file='tree' name='xmlFreeDoc'/>
<typedef line='880' file='tree' name='xmlNodePtr'/>
<function line='949' file='xmlwriter' name='xmlTextWriterWriteAttribute'/>
<function line='632' file='xmlwriter' name='xmlNewTextWriterDoc'/>
@@ -296,6 +248,47 @@
<function line='885' file='tree' name='xmlNewDoc'/>
</uses>
</example>
+ <example filename='parse4.c'>
+ <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
+ <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+ <usage>parse4 test3.xml</usage>
+ <test>parse4 test3.xml</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='94' file='parser' name='xmlFreeParserCtxt'/>
+ <function line='86' file='parser' name='xmlParseChunk'/>
+ <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
+ <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
+ <typedef line='47' file='tree' name='xmlDocPtr'/>
+ </uses>
+ </example>
+ <example filename='reader3.c'>
+ <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader3</usage>
+ <test>reader3 &gt; reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='65' file='xmlreader' name='xmlFreeTextReader'/>
+ <function line='95' file='tree' name='xmlDocDump'/>
+ <function line='51' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
+ <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/>
+ <function line='37' file='xmlreader' name='xmlReaderForFile'/>
+ </uses>
+ </example>
<example filename='io1.c'>
<synopsis>Example of custom Input/Output</synopsis>
<purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose>
@@ -317,39 +310,6 @@
<function line='124' file='parser' name='xmlReadMemory'/>
</uses>
</example>
- <example filename='xpath1.c'>
- <synopsis>Evaluate XPath expression and prints result node set.</synopsis>
- <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose>
- <usage>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</usage>
- <test>./xpath1 test3.xml &apos;//child2&apos; &gt; xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp</test>
- <author>Aleksey Sanin</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>XPath</section>
- <includes>
- <include>&lt;libxml/parser.h&gt;</include>
- <include>&lt;libxml/xpath.h&gt;</include>
- <include>&lt;libxml/xpathInternals.h&gt;</include>
- <include>&lt;libxml/tree.h&gt;</include>
- </includes>
- <uses>
- <enum line='229' file='tree' name='XML_ELEMENT_NODE'/>
- <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
- <function line='117' file='xpath' name='xmlXPathEvalExpression'/>
- <function line='94' file='parser' name='xmlParseFile'/>
- <function line='186' file='xpathInternals' name='xmlXPathRegisterNs'/>
- <function line='129' file='xpath' name='xmlXPathFreeObject'/>
- <variable line='193' file='globals' name='xmlFree'/>
- <typedef line='218' file='tree' name='xmlNsPtr'/>
- <function line='101' file='xpath' name='xmlXPathNewContext'/>
- <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
- <function line='130' file='xpath' name='xmlXPathFreeContext'/>
- <function line='39' file='parser' name='xmlInitParser'/>
- <function line='156' file='xmlstring' name='xmlStrdup'/>
- <function line='180' file='xmlstring' name='xmlStrchr'/>
- <typedef line='206' file='tree' name='xmlNodePtr'/>
- <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
- </uses>
- </example>
<example filename='parse1.c'>
<synopsis>Parse an XML file to a tree and free it</synopsis>
<purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
@@ -384,14 +344,54 @@
<function line='67' file='parser' name='xmlReadFile'/>
</uses>
</example>
+ <example filename='reader4.c'>
+ <synopsis>Parse multiple XML files reusing an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader4 &lt;filename&gt; [ filename ... ]</usage>
+ <test>reader4 test1.xml test2.xml test3.xml &gt; reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp</test>
+ <author>Graham Bennett</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='83' file='xmlreader' name='xmlReaderNewFile'/>
+ <function line='104' file='xmlreader' name='xmlFreeTextReader'/>
+ <function line='26' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
+ <function line='72' file='xmlreader' name='xmlReaderForFile'/>
+ </uses>
+ </example>
+ <example filename='parse2.c'>
+ <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
+ <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose>
+ <usage>parse2 test2.xml</usage>
+ <test>parse2 test2.xml</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='47' file='parser' name='xmlFreeParserCtxt'/>
+ <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
+ <function line='29' file='parser' name='xmlNewParserCtxt'/>
+ <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
+ <function line='35' file='parser' name='xmlCtxtReadFile'/>
+ </uses>
+ </example>
<symbols>
<symbol name='LIBXML_TEST_VERSION'>
- <ref filename='xpath2.c'/>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
- <ref filename='parse2.c'/>
<ref filename='reader2.c'/>
+ <ref filename='xpath2.c'/>
+ <ref filename='xpath1.c'/>
<ref filename='parse3.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='XML_DEFAULT_VERSION'>
<ref filename='testWriter.c'/>
@@ -408,8 +408,8 @@
<ref filename='reader2.c'/>
</symbol>
<symbol name='XML_PARSE_DTDVALID'>
- <ref filename='parse2.c'/>
<ref filename='reader2.c'/>
+ <ref filename='parse2.c'/>
</symbol>
<symbol name='XML_PARSE_NOENT'>
<ref filename='reader2.c'/>
@@ -430,12 +430,12 @@
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlCleanupParser'>
- <ref filename='xpath2.c'/>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
- <ref filename='parse2.c'/>
<ref filename='reader2.c'/>
+ <ref filename='xpath2.c'/>
+ <ref filename='xpath1.c'/>
<ref filename='parse3.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlCreateIntSubset'>
<ref filename='tree2.c'/>
@@ -459,42 +459,42 @@
</symbol>
<symbol name='xmlDocPtr'>
<ref filename='xpath2.c'/>
- <ref filename='reader4.c'/>
- <ref filename='parse2.c'/>
+ <ref filename='xpath1.c'/>
<ref filename='parse3.c'/>
- <ref filename='reader3.c'/>
+ <ref filename='io2.c'/>
+ <ref filename='testWriter.c'/>
<ref filename='parse4.c'/>
</symbol>
<symbol name='xmlDocSetRootElement'>
- <ref filename='tree2.c'/>
<ref filename='io2.c'/>
+ <ref filename='tree2.c'/>
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlFindCharEncodingHandler'>
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlFree'>
+ <ref filename='xpath1.c'/>
<ref filename='io2.c'/>
<ref filename='testWriter.c'/>
- <ref filename='xpath1.c'/>
</symbol>
<symbol name='xmlFreeDoc'>
<ref filename='xpath2.c'/>
- <ref filename='reader4.c'/>
- <ref filename='parse2.c'/>
+ <ref filename='xpath1.c'/>
<ref filename='parse3.c'/>
- <ref filename='reader3.c'/>
+ <ref filename='io2.c'/>
<ref filename='tree2.c'/>
+ <ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlFreeParserCtxt'>
- <ref filename='parse2.c'/>
<ref filename='parse4.c'/>
+ <ref filename='parse2.c'/>
</symbol>
<symbol name='xmlFreeTextReader'>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
<ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
</symbol>
<symbol name='xmlFreeTextWriter'>
<ref filename='testWriter.c'/>
@@ -507,27 +507,27 @@
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlMemoryDump'>
- <ref filename='xpath2.c'/>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
- <ref filename='parse2.c'/>
<ref filename='reader2.c'/>
+ <ref filename='xpath2.c'/>
+ <ref filename='xpath1.c'/>
<ref filename='parse3.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlNewChild'>
<ref filename='tree2.c'/>
</symbol>
<symbol name='xmlNewDoc'>
- <ref filename='tree2.c'/>
<ref filename='io2.c'/>
+ <ref filename='tree2.c'/>
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlNewDocNode'>
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlNewNode'>
- <ref filename='tree2.c'/>
<ref filename='io2.c'/>
+ <ref filename='tree2.c'/>
</symbol>
<symbol name='xmlNewParserCtxt'>
<ref filename='parse2.c'/>
@@ -551,9 +551,9 @@
<ref filename='testWriter.c'/>
</symbol>
<symbol name='xmlNodePtr'>
+ <ref filename='xpath1.c'/>
<ref filename='io2.c'/>
<ref filename='testWriter.c'/>
- <ref filename='xpath1.c'/>
</symbol>
<symbol name='xmlNodeSetContent'>
<ref filename='xpath2.c'/>
@@ -570,8 +570,8 @@
<ref filename='xpath1.c'/>
</symbol>
<symbol name='xmlParserCtxtPtr'>
- <ref filename='parse2.c'/>
<ref filename='parse4.c'/>
+ <ref filename='parse2.c'/>
</symbol>
<symbol name='xmlReadFile'>
<ref filename='parse1.c'/>
@@ -582,10 +582,10 @@
<ref filename='io1.c'/>
</symbol>
<symbol name='xmlReaderForFile'>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
<ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
</symbol>
<symbol name='xmlReaderNewFile'>
<ref filename='reader4.c'/>
@@ -609,54 +609,54 @@
<ref filename='xpath1.c'/>
</symbol>
<symbol name='xmlStrlen'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderConstName'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderConstValue'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderCurrentDoc'>
- <ref filename='reader4.c'/>
<ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
</symbol>
<symbol name='xmlTextReaderDepth'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderHasValue'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderIsEmptyElement'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderIsValid'>
<ref filename='reader2.c'/>
</symbol>
<symbol name='xmlTextReaderNodeType'>
- <ref filename='reader1.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
</symbol>
<symbol name='xmlTextReaderPreservePattern'>
<ref filename='reader3.c'/>
</symbol>
<symbol name='xmlTextReaderPtr'>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
<ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
</symbol>
<symbol name='xmlTextReaderRead'>
- <ref filename='reader1.c'/>
- <ref filename='reader4.c'/>
<ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
<ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
</symbol>
<symbol name='xmlTextWriterEndDocument'>
<ref filename='testWriter.c'/>
@@ -725,10 +725,10 @@
<example filename='io1.c'/>
</section>
<section name='Parsing'>
- <example filename='parse2.c'/>
<example filename='parse3.c'/>
<example filename='parse4.c'/>
<example filename='parse1.c'/>
+ <example filename='parse2.c'/>
</section>
<section name='Tree'>
<example filename='tree2.c'/>
@@ -739,10 +739,10 @@
<example filename='xpath1.c'/>
</section>
<section name='xmlReader'>
- <example filename='reader1.c'/>
- <example filename='reader4.c'/>
<example filename='reader2.c'/>
+ <example filename='reader1.c'/>
<example filename='reader3.c'/>
+ <example filename='reader4.c'/>
</section>
<section name='xmlWriter'>
<example filename='testWriter.c'/>
diff --git a/nanoftp.c b/nanoftp.c
index 8c4ea88b..a54b85b3 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -89,7 +89,7 @@
* A couple portability macros
*/
#ifndef _WINSOCKAPI_
-#ifndef __BEOS__
+#if !defined(__BEOS__) || defined(__HAIKU__)
#define closesocket(s) close(s)
#endif
#define SOCKET int
diff --git a/nanohttp.c b/nanohttp.c
index 07829c7f..9001ae55 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -95,7 +95,7 @@
* A couple portability macros
*/
#ifndef _WINSOCKAPI_
-#ifndef __BEOS__
+#if !defined(__BEOS__) || defined(__HAIKU__)
#define closesocket(s) close(s)
#endif
#define SOCKET int
@@ -844,7 +844,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
status = ioctl(s, FIONBIO, &enable);
}
#else /* VMS */
-#if defined(__BEOS__)
+#if defined(__BEOS__) && !defined(__HAIKU__)
{
bool noblock = true;
status = setsockopt(s, SOL_SOCKET, SO_NONBLOCK, &noblock, sizeof(noblock));
diff --git a/parser.c b/parser.c
index b21a4cee..65af5252 100644
--- a/parser.c
+++ b/parser.c
@@ -113,7 +113,7 @@ static int
xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long size,
xmlEntityPtr ent)
{
- int consumed = 0;
+ unsigned long consumed = 0;
if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
return (0);
@@ -3661,6 +3661,9 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
}
} else {
ent = xmlParseEntityRef(ctxt);
+ ctxt->nbentities++;
+ if (ent != NULL)
+ ctxt->nbentities += ent->owner;
if ((ent != NULL) &&
(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
if (len > buf_size - 10) {
@@ -6951,7 +6954,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
break;
cur = next;
}
- ent->owner = 1;
+ if (ent->owner == 0)
+ ent->owner = 1;
#ifdef LIBXML_LEGACY_ENABLED
if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
xmlAddEntityReference(ent, firstChild, nw);