Stax validating xml noam dating blog

Posted by / 20-Nov-2017 09:57

Stax validating xml

An in-memory tree tends to be several times larger than the document it models.

Now it's a year later, and I am very pleased to report that the next generation API is here.

St AX shares with SAX the ability to read arbitrarily large documents.

However, in St AX the application is in control rather than the parser.

The application tells the parser when it wants to receive the next data chunk rather than the parser telling the client when the next chunk of data is ready. This interface represents a cursor that's moved across an XML document from beginning to end.

Furthermore, St AX exceeds SAX by allowing programs to both read existing XML documents and create new ones. At any given time, this cursor points at one thing: a text node, a start-tag, a comment, the beginning of the document, etc.

stax validating xml-17stax validating xml-19stax validating xml-35

A pull API is based around the more familiar iterator design pattern rather than the less well-known observer design pattern.