[fpc-devel] XML / SAX - Removing redundancies
sergei_gorelkin at mail.ru
Wed Mar 12 12:06:04 CET 2014
12.03.2014 1:32, Daniel Gaspary пишет:
> I have uploaded a patch to remove the TSaxInputSource, it is
> redundant with TXmlInputSource from XmlReader unit.
> I believe the TSAXXMLReader.Parse method have almost the same
> functionality of xmltextreader.TXMLTextReader.
> I would like to know if and how it can be modified. The base class,
> TSaxReader, needs much more changing and could affect users of the
I had an idea of replacing SAX with proxy to TXMLTextReader once I've written the latter, but it
appears that SAX is just beyond redemption. One case is that it reports attribute names in LocalName
property instead of QualifiedName, which means that any code using SAX reads them from wrong place
and *will* break if SAX is made compliant.
OTOH, if we go for breaking user's code, then it is much better to drop SAX altogether and switch
over to TXMLTextReader.
From these points of view the best way is probably to document TXMLTextReader, deprecate SAX and
leave it alone.
All above is about sax-xml; sax-html, unfortunately, does not have a better alternative in FPC packages.
More information about the fpc-devel