I am writing an XML parser in C++ using libxml library which requires me to validate the XML against a DTD which is specified inline. I don't want to use system() in my program. Otherwise I could have used the xmllint command.
I came across the xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) function specified in the http://xmlsoft.org/ API page. But I feel it is DOM based function since in SAX parsing there is no xmlDocPtr.
Are there are any other methods to validate the XML document against the inline DTD?