#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
Functions | |
int | main (void) |
int main | ( | void | ) |
section: XPath synopsis: Load a document, locate subelements with XPath, modify said elements and save the resulting document. purpose: Shows how to make a full round-trip from a load/edit/save usage: xpath2 <xml-file> <xpath-expr> <new-value> test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp author: Aleksey Sanin and Daniel Veillard copy: see Copyright for the status of this software.