Annotation of embedaddon/libxml2/doc/examples/examples.xml, revision 1.1.1.2

1.1       misho       1: <examples>
                      2:   <example filename='xpath1.c'>
                      3:     <synopsis>Evaluate XPath expression and prints result node set.</synopsis>
                      4:     <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose>
                      5:     <usage>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</usage>
1.1.1.2 ! misho       6:     <test>xpath1 test3.xml &apos;//child2&apos; &gt; xpath1.tmp &amp;&amp; diff xpath1.tmp $(srcdir)/xpath1.res</test>
1.1       misho       7:     <author>Aleksey Sanin</author>
                      8:     <copy>see Copyright for the status of this software. </copy>
                      9:     <section>XPath</section>
                     10:     <includes>
                     11:       <include>&lt;libxml/parser.h&gt;</include>
                     12:       <include>&lt;libxml/xpath.h&gt;</include>
                     13:       <include>&lt;libxml/xpathInternals.h&gt;</include>
                     14:       <include>&lt;libxml/tree.h&gt;</include>
                     15:     </includes>
                     16:     <uses>
                     17:       <enum line='229' file='tree' name='XML_ELEMENT_NODE'/>
                     18:       <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
                     19:       <function line='54' file='xmlmemory' name='xmlMemoryDump'/>
                     20:       <function line='117' file='xpath' name='xmlXPathEvalExpression'/>
                     21:       <function line='94' file='parser' name='xmlParseFile'/>
                     22:       <function line='186' file='xpathInternals' name='xmlXPathRegisterNs'/>
                     23:       <function line='129' file='xpath' name='xmlXPathFreeObject'/>
                     24:       <variable line='193' file='globals' name='xmlFree'/>
                     25:       <typedef line='218' file='tree' name='xmlNsPtr'/>
                     26:       <function line='101' file='xpath' name='xmlXPathNewContext'/>
                     27:       <function line='49' file='parser' name='xmlCleanupParser'/>
                     28:       <macro line='43' file='xmlversion' name='LIBXML_TEST_VERSION'/>
                     29:       <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
                     30:       <function line='130' file='xpath' name='xmlXPathFreeContext'/>
                     31:       <function line='39' file='parser' name='xmlInitParser'/>
                     32:       <function line='156' file='xmlstring' name='xmlStrdup'/>
                     33:       <function line='131' file='tree' name='xmlFreeDoc'/>
                     34:       <function line='180' file='xmlstring' name='xmlStrchr'/>
                     35:       <typedef line='206' file='tree' name='xmlNodePtr'/>
                     36:       <typedef line='86' file='tree' name='xmlDocPtr'/>
                     37:       <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
                     38:     </uses>
                     39:   </example>
                     40:   <example filename='parse3.c'>
                     41:     <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
                     42:     <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
                     43:     <usage>parse3</usage>
                     44:     <test>parse3</test>
                     45:     <author>Daniel Veillard</author>
                     46:     <copy>see Copyright for the status of this software. </copy>
                     47:     <section>Parsing</section>
                     48:     <includes>
                     49:       <include>&lt;libxml/tree.h&gt;</include>
                     50:       <include>&lt;libxml/parser.h&gt;</include>
                     51:     </includes>
                     52:     <uses>
                     53:       <function line='33' file='parser' name='xmlReadMemory'/>
                     54:       <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
                     55:       <function line='54' file='parser' name='xmlCleanupParser'/>
                     56:       <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/>
                     57:       <function line='38' file='tree' name='xmlFreeDoc'/>
                     58:       <typedef line='27' file='tree' name='xmlDocPtr'/>
                     59:     </uses>
                     60:   </example>
1.1.1.2 ! misho      61:   <example filename='reader2.c'>
        !            62:     <synopsis>Parse and validate an XML file with an xmlReader</synopsis>
        !            63:     <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>
        !            64:     <usage>reader2 &lt;valid_xml_filename&gt;</usage>
        !            65:     <test>reader2 test2.xml &gt; reader1.tmp &amp;&amp; diff reader1.tmp $(srcdir)/reader1.res</test>
        !            66:     <author>Daniel Veillard</author>
1.1       misho      67:     <copy>see Copyright for the status of this software. </copy>
1.1.1.2 ! misho      68:     <section>xmlReader</section>
1.1       misho      69:     <includes>
1.1.1.2 ! misho      70:       <include>&lt;libxml/xmlreader.h&gt;</include>
1.1       misho      71:     </includes>
                     72:     <uses>
1.1.1.2 ! misho      73:       <function line='45' file='xmlstring' name='xmlStrlen'/>
        !            74:       <function line='109' file='parser' name='xmlCleanupParser'/>
        !            75:       <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
        !            76:       <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
        !            77:       <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
        !            78:       <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/>
        !            79:       <enum line='70' file='parser' name='XML_PARSE_NOENT'/>
        !            80:       <function line='37' file='xmlreader' name='xmlTextReaderDepth'/>
        !            81:       <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/>
        !            82:       <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/>
        !            83:       <function line='84' file='xmlreader' name='xmlFreeTextReader'/>
        !            84:       <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/>
        !            85:       <function line='30' file='xmlreader' name='xmlTextReaderConstName'/>
        !            86:       <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/>
        !            87:       <function line='76' file='xmlreader' name='xmlTextReaderRead'/>
        !            88:       <function line='40' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
        !            89:       <function line='68' file='xmlreader' name='xmlReaderForFile'/>
        !            90:       <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/>
1.1       misho      91:     </uses>
                     92:   </example>
                     93:   <example filename='tree2.c'>
                     94:     <synopsis>Creates a tree</synopsis>
                     95:     <purpose>Shows how to create document, nodes and dump it to stdout or file.</purpose>
                     96:     <usage>tree2 &lt;filename&gt;  -Default output: stdout</usage>
1.1.1.2 ! misho      97:     <test>tree2 &gt; tree2.tmp &amp;&amp; diff tree2.tmp $(srcdir)/tree2.res</test>
1.1       misho      98:     <author>Lucas Brasilino &lt;brasilino@recife.pe.gov.br&gt;</author>
                     99:     <copy>see Copyright for the status of this software </copy>
                    100:     <section>Tree</section>
                    101:     <includes>
                    102:       <include>&lt;libxml/tree.h&gt;</include>
                    103:       <include>&lt;libxml/parser.h&gt;</include>
                    104:     </includes>
                    105:     <uses>
                    106:       <function line='75' file='tree' name='xmlNewText'/>
                    107:       <function line='110' file='xmlmemory' name='xmlMemoryDump'/>
                    108:       <function line='96' file='tree' name='xmlSaveFormatFileEnc'/>
                    109:       <function line='78' file='tree' name='xmlAddChild'/>
                    110:       <function line='41' file='tree' name='xmlDocSetRootElement'/>
                    111:       <function line='105' file='parser' name='xmlCleanupParser'/>
                    112:       <macro line='34' file='xmlversion' name='LIBXML_TEST_VERSION'/>
                    113:       <function line='89' file='tree' name='xmlNewProp'/>
                    114:       <function line='88' file='tree' name='xmlNewChild'/>
                    115:       <function line='74' file='tree' name='xmlNewNode'/>
                    116:       <function line='46' file='tree' name='xmlCreateIntSubset'/>
                    117:       <function line='99' file='tree' name='xmlFreeDoc'/>
                    118:       <function line='39' file='tree' name='xmlNewDoc'/>
                    119:     </uses>
                    120:   </example>
1.1.1.2 ! misho     121:   <example filename='io1.c'>
        !           122:     <synopsis>Example of custom Input/Output</synopsis>
        !           123:     <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>
        !           124:     <usage>io1</usage>
        !           125:     <test>io1 &gt; io1.tmp &amp;&amp; diff io1.tmp $(srcdir)/io1.res</test>
        !           126:     <author>Daniel Veillard</author>
        !           127:     <copy>see Copyright for the status of this software. </copy>
        !           128:     <section>InputOutput</section>
        !           129:     <includes>
        !           130:       <include>&lt;libxml/parser.h&gt;</include>
        !           131:       <include>&lt;libxml/xmlIO.h&gt;</include>
        !           132:       <include>&lt;libxml/xinclude.h&gt;</include>
        !           133:       <include>&lt;libxml/tree.h&gt;</include>
        !           134:     </includes>
        !           135:     <uses>
        !           136:       <function line='143' file='tree' name='xmlDocDump'/>
        !           137:       <function line='158' file='xmlmemory' name='xmlMemoryDump'/>
        !           138:       <function line='149' file='tree' name='xmlFreeDoc'/>
        !           139:       <function line='154' file='parser' name='xmlCleanupParser'/>
        !           140:       <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/>
        !           141:       <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
        !           142:       <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
        !           143:       <function line='124' file='parser' name='xmlReadMemory'/>
        !           144:       <typedef line='105' file='tree' name='xmlDocPtr'/>
        !           145:     </uses>
        !           146:   </example>
        !           147:   <example filename='parse4.c'>
        !           148:     <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
        !           149:     <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>
        !           150:     <usage>parse4 test3.xml</usage>
        !           151:     <test>parse4 test3.xml</test>
        !           152:     <author>Daniel Veillard</author>
        !           153:     <copy>see Copyright for the status of this software. </copy>
        !           154:     <section>Parsing</section>
        !           155:     <includes>
        !           156:       <include>&lt;libxml/tree.h&gt;</include>
        !           157:       <include>&lt;libxml/parser.h&gt;</include>
        !           158:     </includes>
        !           159:     <uses>
        !           160:       <function line='94' file='parser' name='xmlFreeParserCtxt'/>
        !           161:       <function line='86' file='parser' name='xmlParseChunk'/>
        !           162:       <function line='103' file='tree' name='xmlFreeDoc'/>
        !           163:       <function line='135' file='xmlmemory' name='xmlMemoryDump'/>
        !           164:       <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
        !           165:       <function line='131' file='parser' name='xmlCleanupParser'/>
        !           166:       <macro line='120' file='xmlversion' name='LIBXML_TEST_VERSION'/>
        !           167:       <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
        !           168:       <typedef line='47' file='tree' name='xmlDocPtr'/>
        !           169:     </uses>
        !           170:   </example>
        !           171:   <example filename='xpath2.c'>
        !           172:     <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis>
        !           173:     <purpose>Shows how to make a full round-trip from a load/edit/save</purpose>
        !           174:     <usage>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</usage>
        !           175:     <test>xpath2 test3.xml &apos;//discarded&apos; discarded &gt; xpath2.tmp &amp;&amp; diff xpath2.tmp $(srcdir)/xpath2.res</test>
        !           176:     <author>Aleksey Sanin and Daniel Veillard</author>
        !           177:     <copy>see Copyright for the status of this software. </copy>
        !           178:     <section>XPath</section>
        !           179:     <includes>
        !           180:       <include>&lt;libxml/parser.h&gt;</include>
        !           181:       <include>&lt;libxml/xpath.h&gt;</include>
        !           182:       <include>&lt;libxml/xpathInternals.h&gt;</include>
        !           183:       <include>&lt;libxml/tree.h&gt;</include>
        !           184:     </includes>
        !           185:     <uses>
        !           186:       <function line='162' file='tree' name='xmlNodeSetContent'/>
        !           187:       <function line='127' file='tree' name='xmlDocDump'/>
        !           188:       <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
        !           189:       <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
        !           190:       <function line='95' file='parser' name='xmlParseFile'/>
        !           191:       <function line='123' file='xpath' name='xmlXPathFreeObject'/>
        !           192:       <function line='102' file='xpath' name='xmlXPathNewContext'/>
        !           193:       <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
        !           194:       <function line='124' file='xpath' name='xmlXPathFreeContext'/>
        !           195:       <function line='41' file='parser' name='xmlInitParser'/>
        !           196:       <function line='131' file='tree' name='xmlFreeDoc'/>
        !           197:       <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
        !           198:       <typedef line='86' file='tree' name='xmlDocPtr'/>
        !           199:     </uses>
        !           200:   </example>
        !           201:   <example filename='io2.c'>
        !           202:     <synopsis>Output to char buffer</synopsis>
        !           203:     <purpose>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</purpose>
        !           204:     <usage>io2</usage>
        !           205:     <test>io2 &gt; io2.tmp &amp;&amp; diff io2.tmp $(srcdir)/io2.res</test>
        !           206:     <author>John Fleck</author>
        !           207:     <copy>see Copyright for the status of this software. </copy>
        !           208:     <section>InputOutput</section>
        !           209:     <includes>
        !           210:       <include>&lt;libxml/parser.h&gt;</include>
        !           211:     </includes>
        !           212:     <uses>
        !           213:       <function line='29' file='tree' name='xmlNodeSetContent'/>
        !           214:       <function line='36' file='tree' name='xmlDocDumpFormatMemory'/>
        !           215:       <variable line='42' file='globals' name='xmlFree'/>
        !           216:       <function line='30' file='tree' name='xmlDocSetRootElement'/>
        !           217:       <typedef line='20' file='tree' name='xmlDocPtr'/>
        !           218:       <typedef line='19' file='tree' name='xmlNodePtr'/>
        !           219:       <function line='27' file='tree' name='xmlNewDoc'/>
        !           220:       <function line='28' file='tree' name='xmlNewNode'/>
        !           221:     </uses>
        !           222:   </example>
1.1       misho     223:   <example filename='reader1.c'>
                    224:     <synopsis>Parse an XML file with an xmlReader</synopsis>
                    225:     <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>
                    226:     <usage>reader1 &lt;filename&gt;</usage>
1.1.1.2 ! misho     227:     <test>reader1 test2.xml &gt; reader1.tmp &amp;&amp; diff reader1.tmp $(srcdir)/reader1.res</test>
1.1       misho     228:     <author>Daniel Veillard</author>
                    229:     <copy>see Copyright for the status of this software. </copy>
                    230:     <section>xmlReader</section>
                    231:     <includes>
                    232:       <include>&lt;libxml/xmlreader.h&gt;</include>
                    233:     </includes>
                    234:     <uses>
                    235:       <function line='44' file='xmlstring' name='xmlStrlen'/>
                    236:       <function line='37' file='xmlreader' name='xmlTextReaderNodeType'/>
                    237:       <typedef line='59' file='xmlreader' name='xmlTextReaderPtr'/>
                    238:       <function line='33' file='xmlreader' name='xmlTextReaderConstValue'/>
                    239:       <function line='36' file='xmlreader' name='xmlTextReaderDepth'/>
                    240:       <function line='69' file='xmlreader' name='xmlFreeTextReader'/>
                    241:       <function line='29' file='xmlreader' name='xmlTextReaderConstName'/>
                    242:       <function line='40' file='xmlreader' name='xmlTextReaderHasValue'/>
                    243:       <function line='67' file='xmlreader' name='xmlTextReaderRead'/>
                    244:       <function line='39' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
                    245:       <function line='62' file='xmlreader' name='xmlReaderForFile'/>
                    246:     </uses>
                    247:   </example>
1.1.1.2 ! misho     248:   <example filename='tree1.c'>
        !           249:     <synopsis>Navigates a tree to print element names</synopsis>
        !           250:     <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose>
        !           251:     <usage>tree1 filename_or_URL</usage>
        !           252:     <test>tree1 test2.xml &gt; tree1.tmp &amp;&amp; diff tree1.tmp $(srcdir)/tree1.res</test>
        !           253:     <author>Dodji Seketeli</author>
1.1       misho     254:     <copy>see Copyright for the status of this software. </copy>
1.1.1.2 ! misho     255:     <section>Tree</section>
1.1       misho     256:     <includes>
                    257:       <include>&lt;libxml/tree.h&gt;</include>
                    258:       <include>&lt;libxml/parser.h&gt;</include>
                    259:     </includes>
                    260:     <uses>
1.1.1.2 ! misho     261:       <enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
        !           262:       <function line='74' file='tree' name='xmlDocGetRootElement'/>
        !           263:       <function line='67' file='parser' name='xmlReadFile'/>
1.1       misho     264:     </uses>
                    265:   </example>
                    266:   <example filename='reader3.c'>
                    267:     <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
                    268:     <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>
                    269:     <usage>reader3</usage>
1.1.1.2 ! misho     270:     <test>reader3 &gt; reader3.tmp &amp;&amp; diff reader3.tmp $(srcdir)/reader3.res</test>
1.1       misho     271:     <author>Daniel Veillard</author>
                    272:     <copy>see Copyright for the status of this software. </copy>
                    273:     <section>xmlReader</section>
                    274:     <includes>
                    275:       <include>&lt;libxml/xmlreader.h&gt;</include>
                    276:     </includes>
                    277:     <uses>
                    278:       <typedef line='32' file='xmlreader' name='xmlTextReaderPtr'/>
                    279:       <function line='66' file='xmlreader' name='xmlFreeTextReader'/>
                    280:       <function line='96' file='tree' name='xmlDocDump'/>
                    281:       <function line='52' file='xmlreader' name='xmlTextReaderRead'/>
                    282:       <function line='62' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
                    283:       <function line='43' file='xmlreader' name='xmlTextReaderPreservePattern'/>
                    284:       <function line='38' file='xmlreader' name='xmlReaderForFile'/>
                    285:     </uses>
                    286:   </example>
1.1.1.2 ! misho     287:   <example filename='parse2.c'>
        !           288:     <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
        !           289:     <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>
        !           290:     <usage>parse2 test2.xml</usage>
        !           291:     <test>parse2 test2.xml</test>
1.1       misho     292:     <author>Daniel Veillard</author>
                    293:     <copy>see Copyright for the status of this software. </copy>
1.1.1.2 ! misho     294:     <section>Parsing</section>
1.1       misho     295:     <includes>
                    296:       <include>&lt;libxml/tree.h&gt;</include>
1.1.1.2 ! misho     297:       <include>&lt;libxml/parser.h&gt;</include>
1.1       misho     298:     </includes>
                    299:     <uses>
1.1.1.2 ! misho     300:       <function line='47' file='parser' name='xmlFreeParserCtxt'/>
        !           301:       <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
        !           302:       <function line='29' file='parser' name='xmlNewParserCtxt'/>
        !           303:       <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
        !           304:       <function line='35' file='parser' name='xmlCtxtReadFile'/>
1.1       misho     305:     </uses>
                    306:   </example>
                    307:   <example filename='parse1.c'>
                    308:     <synopsis>Parse an XML file to a tree and free it</synopsis>
                    309:     <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
                    310:     <usage>parse1 test1.xml</usage>
                    311:     <test>parse1 test1.xml</test>
                    312:     <author>Daniel Veillard</author>
                    313:     <copy>see Copyright for the status of this software. </copy>
                    314:     <section>Parsing</section>
                    315:     <includes>
                    316:       <include>&lt;libxml/tree.h&gt;</include>
                    317:       <include>&lt;libxml/parser.h&gt;</include>
                    318:     </includes>
                    319:     <uses>
                    320:       <function line='26' file='parser' name='xmlReadFile'/>
                    321:     </uses>
                    322:   </example>
                    323:   <example filename='reader4.c'>
                    324:     <synopsis>Parse multiple XML files reusing an xmlReader</synopsis>
                    325:     <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>
                    326:     <usage>reader4 &lt;filename&gt; [ filename ... ]</usage>
1.1.1.2 ! misho     327:     <test>reader4 test1.xml test2.xml test3.xml &gt; reader4.tmp &amp;&amp; diff reader4.tmp $(srcdir)/reader4.res</test>
1.1       misho     328:     <author>Graham Bennett</author>
                    329:     <copy>see Copyright for the status of this software. </copy>
                    330:     <section>xmlReader</section>
                    331:     <includes>
                    332:       <include>&lt;libxml/xmlreader.h&gt;</include>
                    333:     </includes>
                    334:     <uses>
                    335:       <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/>
                    336:       <function line='83' file='xmlreader' name='xmlReaderNewFile'/>
                    337:       <function line='104' file='xmlreader' name='xmlFreeTextReader'/>
                    338:       <function line='26' file='xmlreader' name='xmlTextReaderRead'/>
                    339:       <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
                    340:       <function line='72' file='xmlreader' name='xmlReaderForFile'/>
                    341:     </uses>
                    342:   </example>
1.1.1.2 ! misho     343:   <example filename='testWriter.c'>
        !           344:     <synopsis>use various APIs for the xmlWriter</synopsis>
        !           345:     <purpose>tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.</purpose>
        !           346:     <usage>testWriter</usage>
        !           347:     <test>testWriter &amp;&amp; for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done</test>
        !           348:     <author>Alfred Mickautsch</author>
1.1       misho     349:     <copy>see Copyright for the status of this software. </copy>
1.1.1.2 ! misho     350:     <section>xmlWriter</section>
1.1       misho     351:     <includes>
1.1.1.2 ! misho     352:       <include>&lt;libxml/encoding.h&gt;</include>
        !           353:       <include>&lt;libxml/xmlwriter.h&gt;</include>
1.1       misho     354:     </includes>
                    355:     <uses>
1.1.1.2 ! misho     356:       <function line='913' file='xmlwriter' name='xmlTextWriterStartDocument'/>
        !           357:       <function line='1121' file='xmlwriter' name='xmlTextWriterEndDocument'/>
        !           358:       <variable line='1183' file='globals' name='xmlRealloc'/>
        !           359:       <function line='925' file='xmlwriter' name='xmlTextWriterWriteComment'/>
        !           360:       <function line='1156' file='encoding' name='xmlFindCharEncodingHandler'/>
        !           361:       <variable line='1166' file='globals' name='xmlMalloc'/>
        !           362:       <typedef line='341' file='tree' name='xmlBufferPtr'/>
        !           363:       <macro line='885' file='parser' name='XML_DEFAULT_VERSION'/>
        !           364:       <function line='901' file='tree' name='xmlDocSetRootElement'/>
        !           365:       <function line='1127' file='xmlwriter' name='xmlFreeTextWriter'/>
        !           366:       <function line='1096' file='xmlwriter' name='xmlTextWriterStartElement'/>
        !           367:       <function line='347' file='tree' name='xmlBufferCreate'/>
        !           368:       <function line='1111' file='xmlwriter' name='xmlTextWriterEndElement'/>
        !           369:       <function line='76' file='xmlwriter' name='xmlNewTextWriterFilename'/>
        !           370:       <function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/>
        !           371:       <function line='1073' file='xmlwriter' name='xmlTextWriterWriteFormatElement'/>
        !           372:       <typedef line='1151' file='encoding' name='xmlCharEncodingHandlerPtr'/>
        !           373:       <typedef line='880' file='tree' name='xmlNodePtr'/>
        !           374:       <function line='949' file='xmlwriter' name='xmlTextWriterWriteAttribute'/>
        !           375:       <function line='632' file='xmlwriter' name='xmlNewTextWriterDoc'/>
        !           376:       <function line='894' file='tree' name='xmlNewDocNode'/>
        !           377:       <function line='1129' file='tree' name='xmlSaveFileEnc'/>
        !           378:       <function line='904' file='xmlwriter' name='xmlNewTextWriterTree'/>
        !           379:       <function line='355' file='xmlwriter' name='xmlNewTextWriterMemory'/>
        !           380:       <variable line='1180' file='globals' name='xmlFree'/>
        !           381:       <function line='613' file='tree' name='xmlBufferFree'/>
        !           382:       <typedef line='878' file='xmlwriter' name='xmlTextWriterPtr'/>
        !           383:       <function line='1103' file='xmlwriter' name='xmlTextWriterWriteElement'/>
        !           384:       <function line='885' file='tree' name='xmlNewDoc'/>
1.1       misho     385:     </uses>
                    386:   </example>
                    387:   <symbols>
                    388:     <symbol name='LIBXML_TEST_VERSION'>
                    389:       <ref filename='xpath1.c'/>
                    390:       <ref filename='parse3.c'/>
1.1.1.2 ! misho     391:       <ref filename='reader2.c'/>
1.1       misho     392:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     393:       <ref filename='io1.c'/>
        !           394:       <ref filename='parse4.c'/>
1.1       misho     395:     </symbol>
                    396:     <symbol name='XML_DEFAULT_VERSION'>
                    397:       <ref filename='testWriter.c'/>
                    398:     </symbol>
                    399:     <symbol name='XML_ELEMENT_NODE'>
                    400:       <ref filename='xpath1.c'/>
                    401:       <ref filename='tree1.c'/>
                    402:     </symbol>
                    403:     <symbol name='XML_NAMESPACE_DECL'>
                    404:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     405:       <ref filename='xpath2.c'/>
1.1       misho     406:     </symbol>
                    407:     <symbol name='XML_PARSE_DTDATTR'>
                    408:       <ref filename='reader2.c'/>
                    409:     </symbol>
                    410:     <symbol name='XML_PARSE_DTDVALID'>
                    411:       <ref filename='reader2.c'/>
                    412:       <ref filename='parse2.c'/>
                    413:     </symbol>
                    414:     <symbol name='XML_PARSE_NOENT'>
                    415:       <ref filename='reader2.c'/>
                    416:     </symbol>
                    417:     <symbol name='xmlAddChild'>
                    418:       <ref filename='tree2.c'/>
                    419:     </symbol>
                    420:     <symbol name='xmlBufferCreate'>
                    421:       <ref filename='testWriter.c'/>
                    422:     </symbol>
                    423:     <symbol name='xmlBufferFree'>
                    424:       <ref filename='testWriter.c'/>
                    425:     </symbol>
                    426:     <symbol name='xmlBufferPtr'>
                    427:       <ref filename='testWriter.c'/>
                    428:     </symbol>
                    429:     <symbol name='xmlCharEncodingHandlerPtr'>
                    430:       <ref filename='testWriter.c'/>
                    431:     </symbol>
                    432:     <symbol name='xmlCleanupParser'>
                    433:       <ref filename='xpath1.c'/>
                    434:       <ref filename='parse3.c'/>
1.1.1.2 ! misho     435:       <ref filename='reader2.c'/>
1.1       misho     436:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     437:       <ref filename='io1.c'/>
        !           438:       <ref filename='parse4.c'/>
1.1       misho     439:     </symbol>
                    440:     <symbol name='xmlCreateIntSubset'>
                    441:       <ref filename='tree2.c'/>
                    442:     </symbol>
                    443:     <symbol name='xmlCreatePushParserCtxt'>
                    444:       <ref filename='parse4.c'/>
                    445:     </symbol>
                    446:     <symbol name='xmlCtxtReadFile'>
                    447:       <ref filename='parse2.c'/>
                    448:     </symbol>
                    449:     <symbol name='xmlDocDump'>
1.1.1.2 ! misho     450:       <ref filename='io1.c'/>
1.1       misho     451:       <ref filename='xpath2.c'/>
                    452:       <ref filename='reader3.c'/>
                    453:     </symbol>
                    454:     <symbol name='xmlDocDumpFormatMemory'>
                    455:       <ref filename='io2.c'/>
                    456:     </symbol>
                    457:     <symbol name='xmlDocGetRootElement'>
                    458:       <ref filename='tree1.c'/>
                    459:     </symbol>
                    460:     <symbol name='xmlDocPtr'>
                    461:       <ref filename='xpath1.c'/>
                    462:       <ref filename='parse3.c'/>
1.1.1.2 ! misho     463:       <ref filename='io1.c'/>
1.1       misho     464:       <ref filename='parse4.c'/>
1.1.1.2 ! misho     465:       <ref filename='xpath2.c'/>
        !           466:       <ref filename='io2.c'/>
1.1       misho     467:     </symbol>
                    468:     <symbol name='xmlDocSetRootElement'>
                    469:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     470:       <ref filename='io2.c'/>
1.1       misho     471:       <ref filename='testWriter.c'/>
                    472:     </symbol>
                    473:     <symbol name='xmlFindCharEncodingHandler'>
                    474:       <ref filename='testWriter.c'/>
                    475:     </symbol>
                    476:     <symbol name='xmlFree'>
                    477:       <ref filename='xpath1.c'/>
                    478:       <ref filename='io2.c'/>
                    479:       <ref filename='testWriter.c'/>
                    480:     </symbol>
                    481:     <symbol name='xmlFreeDoc'>
                    482:       <ref filename='xpath1.c'/>
                    483:       <ref filename='parse3.c'/>
                    484:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     485:       <ref filename='io1.c'/>
        !           486:       <ref filename='parse4.c'/>
        !           487:       <ref filename='xpath2.c'/>
1.1       misho     488:     </symbol>
                    489:     <symbol name='xmlFreeParserCtxt'>
                    490:       <ref filename='parse4.c'/>
                    491:       <ref filename='parse2.c'/>
                    492:     </symbol>
                    493:     <symbol name='xmlFreeTextReader'>
                    494:       <ref filename='reader2.c'/>
                    495:       <ref filename='reader1.c'/>
                    496:       <ref filename='reader3.c'/>
                    497:       <ref filename='reader4.c'/>
                    498:     </symbol>
                    499:     <symbol name='xmlFreeTextWriter'>
                    500:       <ref filename='testWriter.c'/>
                    501:     </symbol>
                    502:     <symbol name='xmlInitParser'>
                    503:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     504:       <ref filename='xpath2.c'/>
1.1       misho     505:     </symbol>
                    506:     <symbol name='xmlMalloc'>
                    507:       <ref filename='testWriter.c'/>
                    508:     </symbol>
                    509:     <symbol name='xmlMemoryDump'>
                    510:       <ref filename='xpath1.c'/>
                    511:       <ref filename='parse3.c'/>
1.1.1.2 ! misho     512:       <ref filename='reader2.c'/>
1.1       misho     513:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     514:       <ref filename='io1.c'/>
        !           515:       <ref filename='parse4.c'/>
1.1       misho     516:     </symbol>
                    517:     <symbol name='xmlNewChild'>
                    518:       <ref filename='tree2.c'/>
                    519:     </symbol>
                    520:     <symbol name='xmlNewDoc'>
                    521:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     522:       <ref filename='io2.c'/>
1.1       misho     523:       <ref filename='testWriter.c'/>
                    524:     </symbol>
                    525:     <symbol name='xmlNewDocNode'>
                    526:       <ref filename='testWriter.c'/>
                    527:     </symbol>
                    528:     <symbol name='xmlNewNode'>
                    529:       <ref filename='tree2.c'/>
1.1.1.2 ! misho     530:       <ref filename='io2.c'/>
1.1       misho     531:     </symbol>
                    532:     <symbol name='xmlNewParserCtxt'>
                    533:       <ref filename='parse2.c'/>
                    534:     </symbol>
                    535:     <symbol name='xmlNewProp'>
                    536:       <ref filename='tree2.c'/>
                    537:     </symbol>
                    538:     <symbol name='xmlNewText'>
                    539:       <ref filename='tree2.c'/>
                    540:     </symbol>
                    541:     <symbol name='xmlNewTextWriterDoc'>
                    542:       <ref filename='testWriter.c'/>
                    543:     </symbol>
                    544:     <symbol name='xmlNewTextWriterFilename'>
                    545:       <ref filename='testWriter.c'/>
                    546:     </symbol>
                    547:     <symbol name='xmlNewTextWriterMemory'>
                    548:       <ref filename='testWriter.c'/>
                    549:     </symbol>
                    550:     <symbol name='xmlNewTextWriterTree'>
                    551:       <ref filename='testWriter.c'/>
                    552:     </symbol>
                    553:     <symbol name='xmlNodePtr'>
                    554:       <ref filename='xpath1.c'/>
                    555:       <ref filename='io2.c'/>
                    556:       <ref filename='testWriter.c'/>
                    557:     </symbol>
                    558:     <symbol name='xmlNodeSetContent'>
                    559:       <ref filename='xpath2.c'/>
                    560:       <ref filename='io2.c'/>
                    561:     </symbol>
                    562:     <symbol name='xmlNsPtr'>
                    563:       <ref filename='xpath1.c'/>
                    564:     </symbol>
                    565:     <symbol name='xmlParseChunk'>
                    566:       <ref filename='parse4.c'/>
                    567:     </symbol>
                    568:     <symbol name='xmlParseFile'>
                    569:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     570:       <ref filename='xpath2.c'/>
1.1       misho     571:     </symbol>
                    572:     <symbol name='xmlParserCtxtPtr'>
                    573:       <ref filename='parse4.c'/>
                    574:       <ref filename='parse2.c'/>
                    575:     </symbol>
                    576:     <symbol name='xmlReadFile'>
                    577:       <ref filename='tree1.c'/>
1.1.1.2 ! misho     578:       <ref filename='parse1.c'/>
1.1       misho     579:     </symbol>
                    580:     <symbol name='xmlReadMemory'>
                    581:       <ref filename='parse3.c'/>
                    582:       <ref filename='io1.c'/>
                    583:     </symbol>
                    584:     <symbol name='xmlReaderForFile'>
                    585:       <ref filename='reader2.c'/>
                    586:       <ref filename='reader1.c'/>
                    587:       <ref filename='reader3.c'/>
                    588:       <ref filename='reader4.c'/>
                    589:     </symbol>
                    590:     <symbol name='xmlReaderNewFile'>
                    591:       <ref filename='reader4.c'/>
                    592:     </symbol>
                    593:     <symbol name='xmlRealloc'>
                    594:       <ref filename='testWriter.c'/>
                    595:     </symbol>
                    596:     <symbol name='xmlRegisterInputCallbacks'>
                    597:       <ref filename='io1.c'/>
                    598:     </symbol>
                    599:     <symbol name='xmlSaveFileEnc'>
                    600:       <ref filename='testWriter.c'/>
                    601:     </symbol>
                    602:     <symbol name='xmlSaveFormatFileEnc'>
                    603:       <ref filename='tree2.c'/>
                    604:     </symbol>
                    605:     <symbol name='xmlStrchr'>
                    606:       <ref filename='xpath1.c'/>
                    607:     </symbol>
                    608:     <symbol name='xmlStrdup'>
                    609:       <ref filename='xpath1.c'/>
                    610:     </symbol>
                    611:     <symbol name='xmlStrlen'>
                    612:       <ref filename='reader2.c'/>
                    613:       <ref filename='reader1.c'/>
                    614:     </symbol>
                    615:     <symbol name='xmlTextReaderConstName'>
                    616:       <ref filename='reader2.c'/>
                    617:       <ref filename='reader1.c'/>
                    618:     </symbol>
                    619:     <symbol name='xmlTextReaderConstValue'>
                    620:       <ref filename='reader2.c'/>
                    621:       <ref filename='reader1.c'/>
                    622:     </symbol>
                    623:     <symbol name='xmlTextReaderCurrentDoc'>
                    624:       <ref filename='reader3.c'/>
                    625:       <ref filename='reader4.c'/>
                    626:     </symbol>
                    627:     <symbol name='xmlTextReaderDepth'>
                    628:       <ref filename='reader2.c'/>
                    629:       <ref filename='reader1.c'/>
                    630:     </symbol>
                    631:     <symbol name='xmlTextReaderHasValue'>
                    632:       <ref filename='reader2.c'/>
                    633:       <ref filename='reader1.c'/>
                    634:     </symbol>
                    635:     <symbol name='xmlTextReaderIsEmptyElement'>
                    636:       <ref filename='reader2.c'/>
                    637:       <ref filename='reader1.c'/>
                    638:     </symbol>
                    639:     <symbol name='xmlTextReaderIsValid'>
                    640:       <ref filename='reader2.c'/>
                    641:     </symbol>
                    642:     <symbol name='xmlTextReaderNodeType'>
                    643:       <ref filename='reader2.c'/>
                    644:       <ref filename='reader1.c'/>
                    645:     </symbol>
                    646:     <symbol name='xmlTextReaderPreservePattern'>
                    647:       <ref filename='reader3.c'/>
                    648:     </symbol>
                    649:     <symbol name='xmlTextReaderPtr'>
                    650:       <ref filename='reader2.c'/>
                    651:       <ref filename='reader1.c'/>
                    652:       <ref filename='reader3.c'/>
                    653:       <ref filename='reader4.c'/>
                    654:     </symbol>
                    655:     <symbol name='xmlTextReaderRead'>
                    656:       <ref filename='reader2.c'/>
                    657:       <ref filename='reader1.c'/>
                    658:       <ref filename='reader3.c'/>
                    659:       <ref filename='reader4.c'/>
                    660:     </symbol>
                    661:     <symbol name='xmlTextWriterEndDocument'>
                    662:       <ref filename='testWriter.c'/>
                    663:     </symbol>
                    664:     <symbol name='xmlTextWriterEndElement'>
                    665:       <ref filename='testWriter.c'/>
                    666:     </symbol>
                    667:     <symbol name='xmlTextWriterPtr'>
                    668:       <ref filename='testWriter.c'/>
                    669:     </symbol>
                    670:     <symbol name='xmlTextWriterStartDocument'>
                    671:       <ref filename='testWriter.c'/>
                    672:     </symbol>
                    673:     <symbol name='xmlTextWriterStartElement'>
                    674:       <ref filename='testWriter.c'/>
                    675:     </symbol>
                    676:     <symbol name='xmlTextWriterWriteAttribute'>
                    677:       <ref filename='testWriter.c'/>
                    678:     </symbol>
                    679:     <symbol name='xmlTextWriterWriteComment'>
                    680:       <ref filename='testWriter.c'/>
                    681:     </symbol>
                    682:     <symbol name='xmlTextWriterWriteElement'>
                    683:       <ref filename='testWriter.c'/>
                    684:     </symbol>
                    685:     <symbol name='xmlTextWriterWriteFormatComment'>
                    686:       <ref filename='testWriter.c'/>
                    687:     </symbol>
                    688:     <symbol name='xmlTextWriterWriteFormatElement'>
                    689:       <ref filename='testWriter.c'/>
                    690:     </symbol>
                    691:     <symbol name='xmlXIncludeProcess'>
                    692:       <ref filename='io1.c'/>
                    693:     </symbol>
                    694:     <symbol name='xmlXPathContextPtr'>
                    695:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     696:       <ref filename='xpath2.c'/>
1.1       misho     697:     </symbol>
                    698:     <symbol name='xmlXPathEvalExpression'>
                    699:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     700:       <ref filename='xpath2.c'/>
1.1       misho     701:     </symbol>
                    702:     <symbol name='xmlXPathFreeContext'>
                    703:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     704:       <ref filename='xpath2.c'/>
1.1       misho     705:     </symbol>
                    706:     <symbol name='xmlXPathFreeObject'>
                    707:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     708:       <ref filename='xpath2.c'/>
1.1       misho     709:     </symbol>
                    710:     <symbol name='xmlXPathNewContext'>
                    711:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     712:       <ref filename='xpath2.c'/>
1.1       misho     713:     </symbol>
                    714:     <symbol name='xmlXPathObjectPtr'>
                    715:       <ref filename='xpath1.c'/>
1.1.1.2 ! misho     716:       <ref filename='xpath2.c'/>
1.1       misho     717:     </symbol>
                    718:     <symbol name='xmlXPathRegisterNs'>
                    719:       <ref filename='xpath1.c'/>
                    720:     </symbol>
                    721:   </symbols>
                    722:   <sections>
                    723:     <section name='InputOutput'>
                    724:       <example filename='io1.c'/>
1.1.1.2 ! misho     725:       <example filename='io2.c'/>
1.1       misho     726:     </section>
                    727:     <section name='Parsing'>
                    728:       <example filename='parse3.c'/>
                    729:       <example filename='parse4.c'/>
                    730:       <example filename='parse2.c'/>
1.1.1.2 ! misho     731:       <example filename='parse1.c'/>
1.1       misho     732:     </section>
                    733:     <section name='Tree'>
                    734:       <example filename='tree2.c'/>
                    735:       <example filename='tree1.c'/>
                    736:     </section>
                    737:     <section name='XPath'>
                    738:       <example filename='xpath1.c'/>
1.1.1.2 ! misho     739:       <example filename='xpath2.c'/>
1.1       misho     740:     </section>
                    741:     <section name='xmlReader'>
                    742:       <example filename='reader2.c'/>
                    743:       <example filename='reader1.c'/>
                    744:       <example filename='reader3.c'/>
                    745:       <example filename='reader4.c'/>
                    746:     </section>
                    747:     <section name='xmlWriter'>
                    748:       <example filename='testWriter.c'/>
                    749:     </section>
                    750:   </sections>
                    751: </examples>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>