/**
* section: xmlReader
* synopsis: Parse an XML file with an xmlReader
* purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file
* and dump the informations about the nodes found in the process.
* (Note that the XMLReader functions require libxml2 version later
* than 2.6.)
* usage: reader1 <filename>
* author: Daniel Veillard
* copy: see Copyright for the status of this software.
*/
#include <stdio.h>
#include <libxml/xmlreader.h>
#ifdef LIBXML_READER_ENABLED
/**
* processNode:
* @reader: the xmlReader
*
* Dump information about the current node
*/
static void
printf("%d %d %s %d %d",
name,
printf("\n");
else {
else
}
}
/**
* streamFile:
* @filename: the file name to parse
*
* Parse and print information about an XML file.
*/
static void
int ret;
while (ret == 1) {
}
if (ret != 0) {
}
} else {
}
}
if (argc != 2)
return(1);
/*
* this initialize the library and check potential ABI mismatches
* between the version it was compiled for and the actual shared
* library used.
*/
/*
* Cleanup function for the XML library.
*/
/*
* this is to debug memory for regression tests
*/
return(0);
}
#else
int main(void) {
exit(1);
}
#endif