How does SAX-Validation work?

Discussion in 'XML' started by Matthias Langbein, May 3, 2006.

  1. Hi,

    I wondered whether anybody knows how XML-Schema-Validation with the
    common SAX-Parsers work. Do they require to build a DOM-Tree before
    processing and validate, or do they handle validation on the fly?

    Thx, Langi
    Matthias Langbein, May 3, 2006
    #1
    1. Advertising

  2. Matthias Langbein wrote:
    > I wondered whether anybody knows how XML-Schema-Validation with the
    > common SAX-Parsers work. Do they require to build a DOM-Tree before
    > processing and validate, or do they handle validation on the fly?


    I would assume SAX parsers validate on the fly, essentially by running a
    finite state machine based on the schema. Note that this means you may
    get halfway through processing the document before you find out that it
    doesn't validate; depending on what you're doing with the document that
    may mean you need to think about database-style "commit phases" or
    reversable operations. (Of course that issue arises any time you've got
    data coming in which may be interrupted partway through, including
    normal communications traffic.)

    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
    Joseph Kesselman, May 3, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,677
    Colin Mackay
    Jun 25, 2003
  2. Replies:
    1
    Views:
    846
    Harish
    Jan 7, 2005
  3. Marcin Cenkier
    Replies:
    2
    Views:
    6,215
    Marcin Cenkier
    Jan 19, 2006
  4. moralbarometer
    Replies:
    8
    Views:
    502
    moralbarometer
    Mar 5, 2007
  5. KaR
    Replies:
    1
    Views:
    471
Loading...

Share This Page