#include <libxml/xmlstring.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xmlmemory.h>
int main(int argc, char** argv)
{
char *namedocument="/home/user/xml/xmlFile.xml";
xmlDoc *document = document.getdoc(namedocument);
return;
}
xmlDoc *getdoc (const char *docname)
{
doc = xmlParseFile(docname);
if (doc == NULL ) {
fprintf(stderr,"El documento no ha pasado el parsec correctamente. \n");
throw "Error leer fichero";
}
return doc;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.