[xml] DTD Validation when using SAX Parser



I am using the SAX parser in libxml to read in relatively large XML
files.  I am using SAX for two reasons:
  - I store all data in non-XML related internal data structures, and
  - I find the callback interface intuitive.

I have a requirement to validate the input XML files against a DTD
prior to parsing them into my internal data structures with SAX.  Do I
need to read the DTD and XML into a DOM tree, validate it, free the
memory, and then proceed with the SAX parsing?  Or is there simpler -
and perhaps less memory and performance intensive - method that I can
use?

I've searched the documentation and Googled, but I have not found any
other solutions.

Thanks,
Dan



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