Evaluate XPath expression and prints result node set. Shows how to evaluate XPath expression and register known namespaces in XPath context. xpath1 <xml-file> <xpath-expr> [<known-ns-list>] Aleksey Sanin see Copyright for the status of this software.
XPath
<libxml/xpath.h> <libxml/parser.h> <libxml/xpathInternals.h> <libxml/tree.h>
Parse an XML file to a tree and free it Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree parse1 test1.xml parse1 test1.xml Daniel Veillard see Copyright for the status of this software.
Parsing
<libxml/tree.h> <libxml/parser.h>
Parse and validate an XML file to a tree and free the result 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. parse2 test2.xml parse2 test2.xml Daniel Veillard see Copyright for the status of this software.
Parsing
<libxml/tree.h> <libxml/parser.h>
Navigates a tree to print element names 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. tree1 filename_or_URL tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.out ; rm tree1.tmp Dodji Seketeli see Copyright for the status of this software.
Tree
<libxml/tree.h> <libxml/parser.h>