[Home] [By Thread] [By Date] [Recent Entries]

  • From: Constantine Plotnikov <cap@m...>
  • To: xml-dev@l...
  • Date: Fri, 21 Jul 2000 19:58:54 +0700

Hi!

Was there a discution about pull variant of the SAX API?
SAX API in the current push variant is somewhat difficult 
to use becuaso othere is is need for artificial stack
of states which could be done with Java execution stack 
instead. The API I want is something like following:

interface XMLEventSource
{
  XMLEvent peekEvent();
  XMLEvent peekEvent(int n);
  XMLEvent getEvent();
  void skipEvent();
  void skipEvents(int n);
}

SAXEvent will encapsulate different XML events like 
CDATA event, BEGIN_ELEMENT_EVENT, etc. Different events 
types may be formalized as one class or differentiated 
using sublcasses.

This API is very similar to API that is used by LL(k)
parsers for communicating with Tokenizers and could 
allow more debuggable programs (java call stack will 
dirrectly correspond to the stack trace).

If there already were the discuttion on such topic,
please give me pointers. 

Constantine

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member