libxml2 r3672 - in trunk: . doc doc/devhelp doc/examples
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: libxml2 r3672 - in trunk: . doc doc/devhelp doc/examples
- Date: Fri, 11 Jan 2008 06:44:01 +0000 (GMT)
Author: veillard
Date: Fri Jan 11 06:44:00 2008
New Revision: 3672
URL: http://svn.gnome.org/viewvc/libxml2?rev=3672&view=rev
Log:
* xml2-config.in: apply patch from Fred Crozat to avoid
outputting -L/usr/lib from xml2-config, fixes #497012
Daniel
Modified:
trunk/ChangeLog
trunk/doc/devhelp/libxml2-valid.html
trunk/doc/examples/examples.xml
trunk/doc/libxml2-api.xml
trunk/xml2-config.in
Modified: trunk/doc/devhelp/libxml2-valid.html
==============================================================================
--- trunk/doc/devhelp/libxml2-valid.html (original)
+++ trunk/doc/devhelp/libxml2-valid.html Fri Jan 11 06:44:00 2008
@@ -101,7 +101,6 @@
<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
<a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="#xmlAddID">xmlAddID</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml2-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table);
-int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
void <a href="#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml2-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table);
@@ -113,6 +112,7 @@
typedef void <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
int <a href="#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname);
void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
+int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
int <a href="#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
Modified: trunk/doc/examples/examples.xml
==============================================================================
--- trunk/doc/examples/examples.xml (original)
+++ trunk/doc/examples/examples.xml Fri Jan 11 06:44:00 2008
@@ -1,53 +1,4 @@
<examples>
- <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>
- <usage>io1</usage>
- <test>io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test>
- <author>Daniel Veillard</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>InputOutput</section>
- <includes>
- <include><libxml/parser.h></include>
- <include><libxml/xmlIO.h></include>
- <include><libxml/xinclude.h></include>
- <include><libxml/tree.h></include>
- </includes>
- <uses>
- <function line='143' file='tree' name='xmlDocDump'/>
- <function line='158' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='149' file='tree' name='xmlFreeDoc'/>
- <function line='154' file='parser' name='xmlCleanupParser'/>
- <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
- <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
- <function line='124' file='parser' name='xmlReadMemory'/>
- <typedef line='105' 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 > 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>
- <includes>
- <include><libxml/parser.h></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='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='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>
@@ -69,76 +20,6 @@
<function line='26' file='parser' name='xmlReadFile'/>
</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><libxml/tree.h></include>
- <include><libxml/parser.h></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='parse3.c'>
- <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
- <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
- <usage>parse3</usage>
- <test>parse3</test>
- <author>Daniel Veillard</author>
- <copy>see Copyright for the status of this software. </copy>
- <section>Parsing</section>
- <includes>
- <include><libxml/tree.h></include>
- <include><libxml/parser.h></include>
- </includes>
- <uses>
- <function line='33' file='parser' name='xmlReadMemory'/>
- <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='54' file='parser' name='xmlCleanupParser'/>
- <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <function line='38' file='tree' name='xmlFreeDoc'/>
- <typedef line='27' file='tree' name='xmlDocPtr'/>
- </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><libxml/tree.h></include>
- <include><libxml/parser.h></include>
- </includes>
- <uses>
- <function line='94' file='parser' name='xmlFreeParserCtxt'/>
- <function line='86' file='parser' name='xmlParseChunk'/>
- <function line='103' file='tree' name='xmlFreeDoc'/>
- <function line='135' file='xmlmemory' name='xmlMemoryDump'/>
- <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
- <function line='131' file='parser' name='xmlCleanupParser'/>
- <macro line='120' file='xmlversion' name='LIBXML_TEST_VERSION'/>
- <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
- <typedef line='47' 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>
@@ -167,33 +48,63 @@
<function line='62' file='xmlreader' name='xmlReaderForFile'/>
</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 <valid_xml_filename></usage>
- <test>reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
+ <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>
+ <usage>xpath2 <xml-file> <xpath-expr> <new-value></usage>
+ <test>xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test>
+ <author>Aleksey Sanin and Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>XPath</section>
+ <includes>
+ <include><libxml/parser.h></include>
+ <include><libxml/xpath.h></include>
+ <include><libxml/xpathInternals.h></include>
+ <include><libxml/tree.h></include>
+ </includes>
+ <uses>
+ <function line='162' file='tree' name='xmlNodeSetContent'/>
+ <function line='127' file='tree' name='xmlDocDump'/>
+ <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='56' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='95' file='parser' name='xmlParseFile'/>
+ <function line='123' file='xpath' name='xmlXPathFreeObject'/>
+ <function line='102' file='xpath' name='xmlXPathNewContext'/>
+ <function line='51' file='parser' name='xmlCleanupParser'/>
+ <macro line='45' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='124' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='41' file='parser' name='xmlInitParser'/>
+ <function line='131' file='tree' name='xmlFreeDoc'/>
+ <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
+ <typedef line='86' file='tree' name='xmlDocPtr'/>
+ </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>
+ <usage>io1</usage>
+ <test>io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test>
<author>Daniel Veillard</author>
<copy>see Copyright for the status of this software. </copy>
- <section>xmlReader</section>
+ <section>InputOutput</section>
<includes>
- <include><libxml/xmlreader.h></include>
+ <include><libxml/parser.h></include>
+ <include><libxml/xmlIO.h></include>
+ <include><libxml/xinclude.h></include>
+ <include><libxml/tree.h></include>
</includes>
<uses>
- <function line='45' file='xmlstring' name='xmlStrlen'/>
- <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
- <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
- <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'/>
- <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'/>
+ <function line='143' file='tree' name='xmlDocDump'/>
+ <function line='158' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='149' file='tree' name='xmlFreeDoc'/>
+ <function line='154' file='parser' name='xmlCleanupParser'/>
+ <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
+ <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
+ <function line='124' file='parser' name='xmlReadMemory'/>
+ <typedef line='105' file='tree' name='xmlDocPtr'/>
</uses>
</example>
<example filename='reader3.c'>
@@ -208,33 +119,18 @@
<include><libxml/xmlreader.h></include>
</includes>
<uses>
+ <function line='106' file='parser' name='xmlCleanupParser'/>
<typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='110' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='99' file='tree' name='xmlFreeDoc'/>
<function line='65' file='xmlreader' name='xmlFreeTextReader'/>
+ <macro line='90' file='xmlversion' name='LIBXML_TEST_VERSION'/>
<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='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 <filename> [ filename ... ]</usage>
- <test>reader4 test1.xml test2.xml test3.xml > 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><libxml/xmlreader.h></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'/>
+ <typedef line='76' file='tree' name='xmlDocPtr'/>
</uses>
</example>
<example filename='testWriter.c'>
@@ -256,7 +152,9 @@
<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'/>
+ <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
<macro line='885' file='parser' name='XML_DEFAULT_VERSION'/>
<function line='901' file='tree' name='xmlDocSetRootElement'/>
<function line='1127' file='xmlwriter' name='xmlFreeTextWriter'/>
@@ -265,8 +163,10 @@
<function line='1111' file='xmlwriter' name='xmlTextWriterEndElement'/>
<function line='76' file='xmlwriter' name='xmlNewTextWriterFilename'/>
<function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/>
+ <function line='54' file='parser' name='xmlCleanupParser'/>
<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'/>
@@ -275,6 +175,7 @@
<function line='904' file='xmlwriter' name='xmlNewTextWriterTree'/>
<function line='355' file='xmlwriter' name='xmlNewTextWriterMemory'/>
<variable line='1180' file='globals' name='xmlFree'/>
+ <macro line='40' file='xmlversion' name='LIBXML_TEST_VERSION'/>
<function line='613' file='tree' name='xmlBufferFree'/>
<typedef line='878' file='xmlwriter' name='xmlTextWriterPtr'/>
<function line='1103' file='xmlwriter' name='xmlTextWriterWriteElement'/>
@@ -296,6 +197,7 @@
<uses>
<enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
<function line='74' file='tree' name='xmlDocGetRootElement'/>
+ <function line='79' file='tree' name='xmlFreeDoc'/>
<function line='67' file='parser' name='xmlReadFile'/>
</uses>
</example>
@@ -323,6 +225,111 @@
<function line='39' file='tree' name='xmlNewDoc'/>
</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><libxml/tree.h></include>
+ <include><libxml/parser.h></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'/>
+ <typedef line='26' file='tree' name='xmlDocPtr'/>
+ </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 <valid_xml_filename></usage>
+ <test>reader2 test2.xml > 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><libxml/xmlreader.h></include>
+ </includes>
+ <uses>
+ <function line='45' file='xmlstring' name='xmlStrlen'/>
+ <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
+ <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
+ <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'/>
+ <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='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 <filename> [ filename ... ]</usage>
+ <test>reader4 test1.xml test2.xml test3.xml > 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><libxml/xmlreader.h></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='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><libxml/tree.h></include>
+ <include><libxml/parser.h></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'/>
+ </uses>
+ </example>
+ <example filename='parse3.c'>
+ <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
+ <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+ <usage>parse3</usage>
+ <test>parse3</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include><libxml/tree.h></include>
+ <include><libxml/parser.h></include>
+ </includes>
+ <uses>
+ <function line='33' 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>
@@ -356,396 +363,24 @@
<enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
</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>
- <usage>xpath2 <xml-file> <xpath-expr> <new-value></usage>
- <test>xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test>
- <author>Aleksey Sanin and 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 > 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>XPath</section>
+ <section>InputOutput</section>
<includes>
<include><libxml/parser.h></include>
- <include><libxml/xpath.h></include>
- <include><libxml/xpathInternals.h></include>
- <include><libxml/tree.h></include>
</includes>
<uses>
- <function line='162' file='tree' name='xmlNodeSetContent'/>
- <function line='127' file='tree' name='xmlDocDump'/>
- <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
- <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
- <function line='95' file='parser' name='xmlParseFile'/>
- <function line='123' file='xpath' name='xmlXPathFreeObject'/>
- <function line='102' file='xpath' name='xmlXPathNewContext'/>
- <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
- <function line='124' file='xpath' name='xmlXPathFreeContext'/>
- <function line='41' file='parser' name='xmlInitParser'/>
- <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
+ <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'/>
</uses>
</example>
- <symbols>
- <symbol name='LIBXML_TEST_VERSION'>
- <ref filename='io1.c'/>
- <ref filename='parse1.c'/>
- <ref filename='parse2.c'/>
- <ref filename='parse3.c'/>
- <ref filename='parse4.c'/>
- <ref filename='reader1.c'/>
- </symbol>
- <symbol name='XML_DEFAULT_VERSION'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='XML_ELEMENT_NODE'>
- <ref filename='tree1.c'/>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='XML_NAMESPACE_DECL'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='XML_PARSE_DTDATTR'>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='XML_PARSE_DTDVALID'>
- <ref filename='parse2.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='XML_PARSE_NOENT'>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlAddChild'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlBufferCreate'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlBufferFree'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlBufferPtr'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlCharEncodingHandlerPtr'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlCleanupParser'>
- <ref filename='io1.c'/>
- <ref filename='parse1.c'/>
- <ref filename='parse2.c'/>
- <ref filename='parse3.c'/>
- <ref filename='parse4.c'/>
- <ref filename='reader1.c'/>
- </symbol>
- <symbol name='xmlCreateIntSubset'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlCreatePushParserCtxt'>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlCtxtReadFile'>
- <ref filename='parse2.c'/>
- </symbol>
- <symbol name='xmlDocDump'>
- <ref filename='io1.c'/>
- <ref filename='reader3.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlDocDumpFormatMemory'>
- <ref filename='io2.c'/>
- </symbol>
- <symbol name='xmlDocGetRootElement'>
- <ref filename='tree1.c'/>
- </symbol>
- <symbol name='xmlDocPtr'>
- <ref filename='io1.c'/>
- <ref filename='io2.c'/>
- <ref filename='parse1.c'/>
- <ref filename='parse2.c'/>
- <ref filename='parse3.c'/>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlDocSetRootElement'>
- <ref filename='io2.c'/>
- <ref filename='testWriter.c'/>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlFindCharEncodingHandler'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlFree'>
- <ref filename='io2.c'/>
- <ref filename='testWriter.c'/>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='xmlFreeDoc'>
- <ref filename='io1.c'/>
- <ref filename='io2.c'/>
- <ref filename='parse1.c'/>
- <ref filename='parse2.c'/>
- <ref filename='parse3.c'/>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlFreeParserCtxt'>
- <ref filename='parse2.c'/>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlFreeTextReader'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- <ref filename='reader3.c'/>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlFreeTextWriter'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlInitParser'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlMalloc'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlMemoryDump'>
- <ref filename='io1.c'/>
- <ref filename='parse1.c'/>
- <ref filename='parse2.c'/>
- <ref filename='parse3.c'/>
- <ref filename='parse4.c'/>
- <ref filename='reader1.c'/>
- </symbol>
- <symbol name='xmlNewChild'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlNewDoc'>
- <ref filename='io2.c'/>
- <ref filename='testWriter.c'/>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlNewDocNode'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlNewNode'>
- <ref filename='io2.c'/>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlNewParserCtxt'>
- <ref filename='parse2.c'/>
- </symbol>
- <symbol name='xmlNewProp'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlNewText'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlNewTextWriterDoc'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlNewTextWriterFilename'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlNewTextWriterMemory'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlNewTextWriterTree'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlNodePtr'>
- <ref filename='io2.c'/>
- <ref filename='testWriter.c'/>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='xmlNodeSetContent'>
- <ref filename='io2.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlNsPtr'>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='xmlParseChunk'>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlParseFile'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlParserCtxtPtr'>
- <ref filename='parse2.c'/>
- <ref filename='parse4.c'/>
- </symbol>
- <symbol name='xmlReadFile'>
- <ref filename='parse1.c'/>
- <ref filename='tree1.c'/>
- </symbol>
- <symbol name='xmlReadMemory'>
- <ref filename='io1.c'/>
- <ref filename='parse3.c'/>
- </symbol>
- <symbol name='xmlReaderForFile'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- <ref filename='reader3.c'/>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlReaderNewFile'>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlRealloc'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlRegisterInputCallbacks'>
- <ref filename='io1.c'/>
- </symbol>
- <symbol name='xmlSaveFileEnc'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlSaveFormatFileEnc'>
- <ref filename='tree2.c'/>
- </symbol>
- <symbol name='xmlStrchr'>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='xmlStrdup'>
- <ref filename='xpath1.c'/>
- </symbol>
- <symbol name='xmlStrlen'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderConstName'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderConstValue'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderCurrentDoc'>
- <ref filename='reader3.c'/>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlTextReaderDepth'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderHasValue'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderIsEmptyElement'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderIsValid'>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderNodeType'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- </symbol>
- <symbol name='xmlTextReaderPreservePattern'>
- <ref filename='reader3.c'/>
- </symbol>
- <symbol name='xmlTextReaderPtr'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- <ref filename='reader3.c'/>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlTextReaderRead'>
- <ref filename='reader1.c'/>
- <ref filename='reader2.c'/>
- <ref filename='reader3.c'/>
- <ref filename='reader4.c'/>
- </symbol>
- <symbol name='xmlTextWriterEndDocument'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterEndElement'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterPtr'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterStartDocument'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterStartElement'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterWriteAttribute'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterWriteComment'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterWriteElement'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterWriteFormatComment'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlTextWriterWriteFormatElement'>
- <ref filename='testWriter.c'/>
- </symbol>
- <symbol name='xmlXIncludeProcess'>
- <ref filename='io1.c'/>
- </symbol>
- <symbol name='xmlXPathContextPtr'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathEvalExpression'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathFreeContext'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathFreeObject'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathNewContext'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathObjectPtr'>
- <ref filename='xpath1.c'/>
- <ref filename='xpath2.c'/>
- </symbol>
- <symbol name='xmlXPathRegisterNs'>
- <ref filename='xpath1.c'/>
- </symbol>
- </symbols>
- <sections>
- <section name='InputOutput'>
- <example filename='io1.c'/>
- <example filename='io2.c'/>
- </section>
- <section name='Parsing'>
- <example filename='parse1.c'/>
- <example filename='parse2.c'/>
- <example filename='parse3.c'/>
- <example filename='parse4.c'/>
- </section>
- <section name='Tree'>
- <example filename='tree1.c'/>
- <example filename='tree2.c'/>
- </section>
- <section name='XPath'>
- <example filename='xpath1.c'/>
- <example filename='xpath2.c'/>
- </section>
- <section name='xmlReader'>
- <example filename='reader1.c'/>
- <example filename='reader2.c'/>
- <example filename='reader3.c'/>
- <example filename='reader4.c'/>
- </section>
- <section name='xmlWriter'>
- <example filename='testWriter.c'/>
- </section>
- </sections>
-</examples>
Modified: trunk/doc/libxml2-api.xml
==============================================================================
--- trunk/doc/libxml2-api.xml (original)
+++ trunk/doc/libxml2-api.xml Fri Jan 11 06:44:00 2008
@@ -1211,13 +1211,13 @@
<exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/>
<exports symbol='XML_SCHEMAS_NCNAME' type='enum'/>
<exports symbol='XML_SCHEMAS_LONG' type='enum'/>
- <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
<exports symbol='XML_SCHEMAS_BOOLEAN' type='enum'/>
<exports symbol='XML_SCHEMAS_ENTITY' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/>
<exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/>
<exports symbol='XML_SCHEMAS_BASE64BINARY' type='enum'/>
- <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
<exports symbol='XML_SCHEMA_FACET_WHITESPACE' type='enum'/>
<exports symbol='XML_SCHEMAS_IDREF' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE' type='enum'/>
@@ -1744,7 +1744,6 @@
<exports symbol='xmlCopyDocElementContent' type='function'/>
<exports symbol='xmlAddID' type='function'/>
<exports symbol='xmlFreeRefTable' type='function'/>
- <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlRemoveID' type='function'/>
<exports symbol='xmlFreeElementTable' type='function'/>
<exports symbol='xmlFreeIDTable' type='function'/>
@@ -1756,6 +1755,7 @@
<exports symbol='xmlValidityWarningFunc' type='function'/>
<exports symbol='xmlValidatePopElement' type='function'/>
<exports symbol='xmlFreeEnumeration' type='function'/>
+ <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlCopyEnumeration' type='function'/>
<exports symbol='xmlGetDtdAttrDesc' type='function'/>
<exports symbol='xmlValidateDtd' type='function'/>
@@ -3452,15 +3452,15 @@
<exports symbol='XPATH_ENCODING_ERROR' type='enum'/>
<exports symbol='XPTR_RESOURCE_ERROR' type='enum'/>
<exports symbol='XPATH_NUMBER' type='enum'/>
- <exports symbol='XPATH_POINT' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
<exports symbol='XPATH_USERS' type='enum'/>
<exports symbol='XPATH_UNDEF_PREFIX_ERROR' type='enum'/>
<exports symbol='XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
- <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
<exports symbol='XPATH_RANGE' type='enum'/>
<exports symbol='XPTR_SYNTAX_ERROR' type='enum'/>
<exports symbol='XPATH_LOCATIONSET' type='enum'/>
<exports symbol='XPATH_INVALID_CTXT' type='enum'/>
+ <exports symbol='XPATH_POINT' type='enum'/>
<exports symbol='XPATH_INVALID_ARITY' type='enum'/>
<exports symbol='XPATH_STRING' type='enum'/>
<exports symbol='XPATH_INVALID_PREDICATE_ERROR' type='enum'/>
Modified: trunk/xml2-config.in
==============================================================================
--- trunk/xml2-config.in (original)
+++ trunk/xml2-config.in Fri Jan 11 06:44:00 2008
@@ -84,7 +84,7 @@
--libs)
if [ "`uname`" = "Linux" ]
then
- if [ "@XML_LIBDIR@" = "-L/usr/lib64" ]
+ if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
then
echo @XML_LIBS@
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]