[
Lists Home |
Date Index |
Thread Index
]
> -----Original Message-----
> From: Jeff Lowery
> To: Sterin, Ilya; 'Dare Obasanjo '; 'xml-dev@lists.xml.org '
> Sent: 1/25/02 11:46 AM
> Subject: RE: [xml-dev] Push and Pull?
>
> Sorry to come to this discussion late. Somehow this thread
> didn't arrive
> until this morning...
>
Actually, you didn't. I just started it again this morning, after some
writing and the need for terminology and definitions.
> These are my meanings:
>
> push- SAX: the parser pushes the data to the document handler; the
> handler
> decides what data it is interested in
That's exactly what I thought.
>
> pull- kXML: the parser says where it is, the DH tells the parser which
> way
> to go. In other words, the document handler has the parser
> pull only the
> data it's interested in; branches get skipped. The document does not
> have to
> be in-memory
I see where you are getting with this, but do you mean that only the
branches that are told to be relavant are kept in memory, or neither.
Because if nothing is cached, than this goes bac to the pull idea.
>
> batch (or ??)- DOM: A single method loads the document in-memory. The
> app
> then navigates at its leisure
Ok, but I would consider this pull as well. Why do you not think that the
pull concept applies here. Instead of telling the parser what to load as in
your pull explanation above, you are in a way telling it to load the whole
document and make all nodes relavant. Then I think we are in the pull
concept area again?
>
> fully directed- (XQuery??)- the document handler builds instructions
> that
> the parser uses to navigate and return data from the document.
That's a new way to look at it for me. Have to give it a thought. I would
think XQuery would fit into the DOM/pull (batch) category, since it just
uses a different access syntax, but the document is accessed the same way.
>
> Sounds like we may need to standardize terms here...
That's what I am after. I just want to make sure that the terms can be
refered to in some sort of a document, thread, online resource, etc... Or I
can just read everything about push and pull at this time and disagree or
agree based on my view. Standardizing the terms and the meanings, we'll
have something to refer to, even if someone's view (like mine:-) is
different.
Ilya
>
> Jeff
>
>
>
>
> > -----Original Message-----
> > From: Sterin, Ilya [mailto:Isterin@ciber.com]
> > Sent: Friday, January 25, 2002 10:34 AM
> > To: 'Dare Obasanjo '; Jeff Lowery; 'xml-dev@lists.xml.org '
> > Subject: RE: [xml-dev] Push and Pull?
> >
> >
> > I didn't say in necessarily meant in all memory
> > representations, but rather
> > that pull refers to the parsers like (DOM) that load the data
> > and make it
> > available to the program through a structure/interface, where
> > push interface
> > gives you the flexibility of even handlers (SAX) interface.
> >
> > Ilya
> >
> > -----Original Message-----
> > From: Dare Obasanjo
> > To: Sterin, Ilya; ''Jeff Lowery' '; xml-dev@lists.xml.org
> > Sent: 11/25/01 12:43 PM
> > Subject: Re: [xml-dev] Push and Pull?
> >
> > No. The pull model has *nothing* to do with an in-memory
> > representation
> > of the
> > document. If you are confused about the pull model, a quick Google
> > search[0]
> > will explain it to you. In fact from where I sit, throwing
> > some XML into
> > the
> > DOM and then manipulating the object model is _not_ parsing.
> > Below is an
> > example of pull-based parsing taken from fawcette.com
> >
> > XmlTextReader reader = new
> > XmlTextReader(Server.MapPath("myfile.xml"));
> > while (reader.Read()) {
> > if (reader.NodeType == XmlNodeType.Element) {
> > Response.Write("Found an Element!<br />");
> > if (reader.HasAttributes()) {
> > while (reader.MoveToNextAttribute()) {
> > Response.Write(
> > " Found an Attribute!<br />");
> > }
> > }
> > }
> > }
> > // Make sure you close the stream to prevent file locking
> > reader.Close();
> >
> > Note how it differs from push or event based processing in that you
> > control
> > the flow of processing instead of passively waiting for
> callbacks from
> > the
> > API.
> >
> > What Jeff claimed to be "batch parsing" which is a term I
> > disagree with
> > since
> > no parsing is being done by the application developer but
> > instead by the
> > internal DOM APIs is using a loadXML style method to load a
> > string into
> > the
> > DOM[2]. Or at least that's what it sounds like he is talking about.
> >
> > [0] http://www.google.com/search?hl=en&q=pull+model+xml+
> > [1]
> http://www.fawcette.com/xmlmag/2001_11/magazine/departments/tips/
> > [2]
> > http://www.devguru.com/Technologies/xmldom/quickref/document_l
> > oadXML.htm
> > l
> >
> > --
> > THINGS TO DO IF I BECOME AN EVIL OVERLORD #118
> > If I have equipment which performs an important function,
> it will not
> > be activated by a lever that someone could trigger by accidentally
> > falling
> > on when fatally wounded.
> >
> > ----- Original Message -----
> > From: "Sterin, Ilya" <Isterin@ciber.com>
> > To: "'Dare Obasanjo '" <kpako@yahoo.com>; "''Jeff Lowery' '"
> > <jlowery@scenicsoft.com>; <xml-dev@lists.xml.org>
> > Sent: Friday, January 25, 2002 7:21 AM
> > Subject: RE: [xml-dev] Push and Pull?
> >
> >
> > > Correct, that's actually what I was refering too. The
> pull model is
> > refered
> > > to in memory parsing. The parser creates an in memory
> > representation
> > (data
> > > structure) of the xml doc.
> > >
> > > Now, what I would like to know is the difference between
> > that and what
> > Jeff
> > > mentioned as a batch processing, which also creates an
> **in memory**
> > > representation of the doc? DOM parsers are pull parsers.
> > >
> > > When you guys say it loads directly, what do you mean. It
> > doesn't use
> > a
> > > traversal to load into DOM.
> > >
> > > Ilya
> > >
> > > -----Original Message-----
> > > From: Dare Obasanjo
> > > To: Sterin, Ilya; 'Jeff Lowery'; xml-dev@lists.xml.org
> > > Sent: 11/25/01 3:17 AM
> > > Subject: Re: [xml-dev] Push and Pull?
> > >
> > > Errr, no.
> > >
> > > The pull model is that used by Microsoft .NET's XmlReader
> API[0] or
> > > XPP[1]. In
> > > the push model the API calls your methods as it sees parts
> > of the XML
> > > stream
> > > while in the pull model you are in complete control of
> > traversing the
> > > XML
> > > stream.
> > >
> > > One way of looking at it is that in the pull model, the big
> > while loop
> > > that
> > > iterates through all the nodes in document is hidden from
> > you while in
> > > pull
> > > model you're the one that writes it.
> > >
> > >
> > > [0]
> > >
> > http://msdn.microsoft.com/library/en-us/cpguide/html/cpconread
> > ingxmlwith
> > > xmlrea
> > > der.asp
> > > [1] http://www.extreme.indiana.edu/soap/xpp/
> > >
> > > --
> > > THINGS TO DO IF I BECOME AN EVIL OVERLORD #112
> > > I will not rely entirely upon "totally reliable" spells
> that can be
> > > neutralized by relatively inconspicuous talismans.
> > >
> > > ----- Original Message -----
> > > From: "Sterin, Ilya" <Isterin@ciber.com>
> > > To: "'Dare Obasanjo'" <kpako@yahoo.com>; "'Jeff Lowery'"
> > > <jlowery@scenicsoft.com>; <xml-dev@lists.xml.org>
> > > Sent: Friday, January 25, 2002 2:08 AM
> > > Subject: RE: [xml-dev] Push and Pull?
> > >
> > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Dare Obasanjo [mailto:kpako@yahoo.com]
> > > > > Sent: Sunday, November 25, 2001 1:45 AM
> > > > > To: Sterin, Ilya; 'Jeff Lowery'; xml-dev@lists.xml.org
> > > > > Subject: Re: [xml-dev] Push and Pull?
> > > > >
> > > > >
> > > > > From where I sit they are very different. Batch parsing is
> > > > > loading an entire stream or string into the DOM in one step
> > > > > with a loadXML or similar method, then interacting with the
> > > > > XML from the DOM. Pull parsing is at the other end of the
> > > > > horizon where you iterate through every node in your document
> > > > > one-by-one (text, element, PI, comment, etc) and perform
> > > > > operations utilizing the ones you are interested in.
> > > >
> > > > You are actually refering to even driven parsing, which
> > is the push
> > > > model. The pull model loads the document in memory, so
> > DOM parsers
> > > are
> > > > considered pull.
> > > >
> > > > Ilya
> > > >
> > > >
> > > > >
> > > > > At least that's what I gathered from the descriptions
> I've seen.
> > > YMMV.
> > > > >
> > > > > --
> > > > > THINGS TO DO IF I BECOME AN EVIL OVERLORD #112
> > > > > I will not rely entirely upon "totally reliable" spells that
> > > > > can be neutralized by relatively inconspicuous talismans.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Sterin, Ilya" <Isterin@ciber.com>
> > > > > To: "'Jeff Lowery'" <jlowery@scenicsoft.com>;
> > > <xml-dev@lists.xml.org>
> > > > > Sent: Friday, January 25, 2002 1:35 AM
> > > > > Subject: RE: [xml-dev] Push and Pull?
> > > > >
> > > > >
> > > > > > Jeff, quick question, how would batch parsing differ
> > from pull,
> > I
> > > > > > would think it's the same concept? Maybe I'm just not
> > > > > understanding
> > > > > > this correctly?
> > > > > >
> > > > > > Ilya
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Jeff Lowery [mailto:jlowery@scenicsoft.com]
> > > > > > > Sent: Wednesday, January 16, 2002 1:45 PM
> > > > > > > To: 'Sterin, Ilya'; xml-dev@lists.xml.org
> > > > > > > Subject: RE: [xml-dev] Push and Pull?
> > > > > > >
> > > > > > >
> > > > > > > A third is what I would call (for want of a better name)
> > "batch"
> > > > > > > parsing, such as where a parser writes directly to a DOM.
> > > > > I believe
> > > > > > > there's a method in the W3C DOM to load a
> document directly;
> > at
> > > > > > > least I know that some implementation support
> that feature.
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Sterin, Ilya [mailto:Isterin@ciber.com]
> > > > > > > > Sent: Tuesday, January 15, 2002 11:39 PM
> > > > > > > > To: xml-dev@lists.xml.org
> > > > > > > > Subject: [xml-dev] Push and Pull?
> > > > > > > >
> > > > > > > >
> > > > > > > > Push and Pull being the most popular ways of
> parsing XML,
> > > > > > > can someone
> > > > > > > > please list some alternatives, if any. Most
> documentation
> > > > > > > says that
> > > > > > > > push and pull are two ways of parsing, though it never
> > > > > mentiones
> > > > > > > > if there are other ways as well.
> > > > > > > >
> > > > > > > > Thanks.
> > > > > > > >
> > > > > > > > Ilya
> > > > > > > >
> > > > > > > >
> > > > >
> > -----------------------------------------------------------------
> > > > > > > > The xml-dev list is sponsored by XML.org
> > > > > <http://www.xml.org>, an
> > > > > > > > initiative of OASIS
> > > > > <http://www.oasis-open.org>
> > > > > > > >
> > > > > > > > The list archives are at
> > > http://lists.xml.org/archives/xml-dev/
> > > > > > > >
> > > > > > > > To subscribe or unsubscribe from this list use the
> > > subscription
> > > > > > > > manager: <http://lists.xml.org/ob/adm.pl>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > -----------------------------------------------------------------
> > > > > > The xml-dev list is sponsored by XML.org
<http://www.xml.org>,
> an
> > > > > initiative of OASIS <http://www.oasis-open.org>
> > > > >
> > > > > The list archives are at
> http://lists.xml.org/archives/xml-dev/
> > > > >
> > > > > To subscribe or unsubscribe from this list use the
> subscription
> > > > > manager: <http://lists.xml.org/ob/adm.pl>
> > > >
> > > >
> > > > _________________________________________________________
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
|