|
#include "everything.h"
struct exception_context the_exception_context[1];
int main(){
exception e;
VTDGen *vg = NULL;
VTDNav *vn = NULL;
AutoPilot *ap = NULL;
XMLModifier *xm = NULL;
FILE *f = NULL;
UCSChar *string = NULL;
int i;
Try{
xm = createXMLModifier();
ap = createAutoPilot2();
selectXPath(ap,L"/root/b");
vg = createVTDGen();
if (parseFile(vg,FALSE,"d:/ximpleware_2.2_c/vtd-xml/codeGuru/7/input.xml")){
vn = getNav(vg,f);
bind(ap,vn);
bind4XMLModifier(xm,vn);
while((i=evalXPath(ap))!=-1){
remove4XMLModifier(xm);
}
output2(xm,"d:/ximpleware_2.2_c/vtd-xml/codeGuru/7/new.xml");
free(vn->XMLDoc);
}
else
free(vg->XMLDoc);
}Catch(e){// handle various types of exceptions here
}
freeXMLModifier(xm);
freeAutoPilot(ap);
freeVTDGen(vg);
freeVTDNav(vn);
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Jimmy Zhang is a cofounder of XimpleWare, a provider of high performance XML processing solutions. He has working experience in the fields of electronic design automation and Voice over IP for a number of Silicon Valley high-tech companies. He holds both a BS and MS from the department of EECS from U.C. Berkeley.