Re: [xml-dev] RFC for XML Object Parsing

From
Norman Gray <>
To
Brian Aberle <>
Date
2014-03-24T21:19:24Z
ID
<>
Thread
Re: [xml-dev] RFC for XML Object Parsing
Brian, hello.

On 2014 Mar 24, at 20:52, Brian Aberle <> wrote:

> SAX should be calling all your handlers in the order that they appear in the XML,

No: as Amy said, the SAX interface specification does not require the elements in the Attributes interface to appear in any particular order.  If one particular parser (implementation) finds it convenient to report them in reverse order, for whatever reason, then it's allowed to do that.

If you have a particular parser which happens to report attributes in document order; and if that XML is (known to be) generated in such a way that the @oid attribute value will be unchanged if the element content is unchanged; and if that parser implementation is such that you can thereupon quickly skip to the end of that element; then yes: you have a situation which will rather neatly optimise the reading of a _large_ XML file.

But you will surely agree that that is a rather unusual situation, and thus that there will be rather few situations in which this optimisation will be useful.

Best wishes,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK