📄 examples.xml
字号:
<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='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'/> <typedef line='86' file='tree' name='xmlDocPtr'/> </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> <usage>parse1 test1.xml</usage> <test>parse1 test1.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='26' file='parser' name='xmlReadFile'/> </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 <xml-file> <xpath-expr> [<known-ns-list>]</usage> <test>./xpath1 test3.xml '//child2' > 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><libxml/parser.h></include> <include><libxml/xpath.h></include> <include><libxml/xpathInternals.h></include> <include><libxml/tree.h></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='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='134' file='xinclude' name='xmlXIncludeProcess'/> <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/> <function line='124' file='parser' name='xmlReadMemory'/> </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='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'/> </uses> </example> <symbols> <symbol name='LIBXML_TEST_VERSION'> <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> <ref filename='reader4.c'/> <ref filename='testWriter.c'/> <ref filename='parse3.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='xpath2.c'/> <ref filename='xpath1.c'/> </symbol> <symbol name='XML_PARSE_DTDATTR'> <ref filename='reader2.c'/> </symbol> <symbol name='XML_PARSE_DTDVALID'> <ref filename='reader2.c'/> <ref filename='parse2.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='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> <ref filename='reader4.c'/> <ref filename='testWriter.c'/> <ref filename='parse3.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='reader3.c'/> <ref filename='xpath2.c'/> <ref filename='io1.c'/> </symbol> <symbol name='xmlDocDumpFormatMemory'> <ref filename='io2.c'/> </symbol> <symbol name='xmlDocGetRootElement'> <ref filename='tree1.c'/> </symbol> <symbol name='xmlDocPtr'> <ref filename='reader3.c'/> <ref filename='io2.c'/> <ref filename='reader4.c'/> <ref filename='testWriter.c'/> <ref filename='parse3.c'/> <ref filename='xpath2.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='reader3.c'/> <ref filename='io2.c'/> <ref filename='reader4.c'/> <ref filename='testWriter.c'/> <ref filename='parse3.c'/> <ref filename='tree2.c'/> </symbol> <symbol name='xmlFreeParserCtxt'> <ref filename='parse4.c'/> <ref filename='parse2.c'/> </symbol> <symbol name='xmlFreeTextReader'> <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> <ref filename='reader4.c'/> </symbol> <symbol name='xmlFreeTextWriter'> <ref filename='testWriter.c'/> </symbol> <symbol name='xmlInitParser'>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -