How does SAX-Validation work?

  • Thread starter Matthias Langbein
  • Start date
M

Matthias Langbein

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
 
J

Joseph Kesselman

Matthias said:
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.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top