[Expat-bugs] [ expat-Bugs-544682 ] Support Pull operation

SourceForge.net noreply at sourceforge.net
Tue Jan 20 11:27:26 EST 2004


Bugs item #544682, was opened at 2002-04-16 10:34
Message generated for change (Comment added) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=544682&group_id=10127

Category: None
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Karl Waclawek (kwaclaw)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Support Pull operation

Initial Comment:
Would it be hard to add the following functions?
 - suspend() ...suspends parsing, remembers state
 - resume()  ...resumes parsing from where it was 
suspended
 - abort()   ...cancels parsing
 
This looks like the concept of coroutines, and could 
have the following benefit: One could implement a
"pull" based  parser on top of the "push" based model 
of Expat.
 
This has recently been chosen as Microsoft's new 
approach,  i.e. in XML.NET, SAX has been replaced by
a pull based parser("XMLReader").
 
Typical pull code would look like:
 while parser.nextNode() do
 begin
  //process current node
 end;
 
It seems to me such a parser could be implemented on
top of SAX or Expat, if there was functionality as 
described above. Microsoft's MSXML3 implementation
has the IMXReaderControl interface, which allows 
exactly that. Makes me think that (maybe) MS's "pull"
implementation is implemented on top of their own SAX 
parser.
 
So, my question again: How hard would it be to add
such coroutine-like functionality to Expat?
 
Karl
 


----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-01-20 11:27

Message:
Logged In: YES 
user_id=3066

Note that patch #835123 has been applied to current CVS.

Karl, it's probably safe to close this.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2003-11-10 13:21

Message:
Logged In: YES 
user_id=290026

Check out patch #835123. If accepted, this should be
a major step towards fulfilling this feature request.

The question even is if patch #835123 would not be sufficient,
as it may be a better approach to implement the actual
Pull API in the target language that wraps the Expat parser.

A C-style Pull API would then be only targeted at the
C-language itself.

Karl

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-27 23:04

Message:
Logged In: YES 
user_id=290026

It looks as if I am going to try to port the block/unblock
functionality from the Mozilla version of Expat.
Assigned to me because of that.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=544682&group_id=10127



More information about the Expat-bugs mailing list