From: Nat Pryce Date: 2002-05-07T23:41:24+09:00 Subject: Re: REXML and streaming APIs Can you explain in more detail? I don't understand your analogy. A recursive descent parser recursively traverses the input structure. Its structure and flow of control is defined by the grammar and content of the input. It has nothing to do with output at all. For example, a recursive descent parser for a compiler is structured according to the grammar of the source language that it parses, not the assembly code that is output by the compiler. Recursive descent language processors usually build internal data structures during the parsing phase and then traverse those data structures during the output phase. Anyway, my main argument is that it is trivial to convert a pull parser to a push parser with an adapter object but much more complex to convert a push parser to a pull parser, so a pull parser will give us the best of both worlds. Cheers, Nat. ________________________________ Dr. Nathaniel Pryce B13media Ltd. Studio 3a, Aberdeen Business Centre, 22/24 Highbury Grove, London, N5 2EA http://www.b13media.com ----- Original Message ----- From: "Tobias Reif" To: "ruby-talk ML" Sent: Tuesday, May 07, 2002 2:26 PM Subject: Re: REXML and streaming APIs > Nat Pryce wrote: > > > > 1) It much easier to process XML data in a recursive descent style with a > > pull parser compared to a push parser. > > > I disagree. XSLT analogy: > > template match="p" > > push style is easier when using a "recursive descent style" which does > thing saccording tothe structure of the input than the > > value-of > > pull style (which is more focused on the output structure). > > Tobi > > > -- > http://www.pinkjuice.com/ >