Im trying to load HTML with Xerces DOMDocument C++ Parser and search for specific HTML Elements. I am having trouble finding good examples on how to accomplish this. All I seem to find is parsing XML. Can someone assist? Thanks.
Im trying to load HTML with Xerces DOMDocument C++ Parser and search for specific
Share
Take a look at this: http://xerces.apache.org/xerces-c/program-dom-3.html
There is an example with DOMDocument as well:
//
// Create a small document tree
//
… and so long.
EDIT:
XercesDOMParser parser;
parser.loadGrammar(“grammar.dtd”, Grammar::DTDGrammarType);
parser.setValidationScheme(XercesDOMParser::Val_Always);
Handler handler;
parser.setErrorHandler( &handler );
parser.parse(“xmlfile.xml”);