From: Christophe de V. <cde...@al...> - 2003-02-01 15:24:48
|
Le Samedi 1 F=E9vrier 2003 16:42, Stefan Seefeld a =E9crit : > Christophe de Vienne wrote: > > Moreover, I personnaly think that having a DomParser class makes more > > natural the fact to have several parser working at the same time. > > I don't understand that. Again, generating a document object doesn't > involve any state that justifies a parser *object*. Even the parser optio= ns > you are talking about could well be put into the 'create_document' functi= on > arguments (with sensible default values). > There is one case, which we did not implement yet although, that justify=20 having a state : libxml propose an interface, xmlParseChunk, that allow to= =20 parse a document by small pieces. With a Parser class it will be easy and=20 natural to have, for exemple, two parsers building two document at the same= =20 time without interfering. Even if it's a rare case, there is not much to do= =20 to make it possible with a parser object, while having a function would for= ce=20 us to add a state. Regards, Christophe |