Norman
So it's official some SAX parsers can do this and some cannot. It depends on the implementation. That's the final word. In the case of the _large_ XML file there is no choice, it's this or something that's not XML. The additional uses cases of automatic support for element updates is handier than you know. Once you live with it for a while you cant live without it - like a smart phone. Many programmers write code to handle updates. I hope you can take the time to run two examples, ExIndexObjects, and TheOIDProtocol in the source download here: http://1drv.ms/1jjcJub You will see more use cases for the more typical situation via OID updates in those two examples. Brian > Subject: Re: [xml-dev] RFC for XML Object Parsing > From: norman@astro.gla.ac.uk > Date: Mon, 24 Mar 2014 21:19:24 +0000 > CC: amyzing@talsever.com; xml-dev@lists.xml.org > To: xmlboss@live.com > > > Brian, hello. > > On 2014 Mar 24, at 20:52, Brian Aberle <xmlboss@live.com> 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 > |