Re: [Saxdotnet-devel] Merging the IXmlReaderControl with IXmlReader
Brought to you by:
jeffrafter,
kwaclaw
From: Elliotte H. <el...@me...> - 2004-12-07 20:24:28
|
Karl Waclawek wrote: > Mostly for simplicity of coding. > Let's say your factory returns an IXmlReader. > Then you just check the reader-control feature > (I think we haven't metioned that yet) > and go on coding with Resume() and Suspend(). I don't find this simpler at all. The simple, obvious solution is to either have a separate factory that creates suspendable parsers or have a separate getSuspendableReader method. If the client knows they want a suspendable parser, then let them ask the factory for one instead of asking for some parser and getting back Lord knows what. It might be worth looking at how JAXP's SAXParserFactory class works and consider using something along those lines that allows you to set features and properties on the factory rather than on each individual XmlReader. -- Elliotte Rusty Harold el...@me... XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim |