[xml] DTD attribute completion with SAX parsing




Hi,

I'd like to parse a document with the SAX API (I want to build a tree
myself), and at the same time I'd like default attributes to be completed
from the DTD supplied in the DOCTYPE of the xml doc, like xmllint --dtdattr.
Is this possible with LibXML, or attribute completion only works with the
tree building parser functions?

I've tried 
    xmlDoValidityCheckingDefaultValue = 1;
    xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS;
    xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
    xmlSubstituteEntitiesDefaultValue = 1; 
together with xmlCreatePushParserCtxt() and xmlParseChunk()
and it doesn't seem to work (libxml2-2.5.4.win32).

Thanks in advance.
Andras 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]