> Expat has callbacks for the beginnings and ends of any XML element. This > allows more general caller-side allocation & object creation (or lack > thereof!) strategies. In this example, the code could simply update x,y,z > totals at the end of every complete element with a name in [xyz] -- the way > my hacked-parseJsonFragments does, but much less hacky.
One thing that xsv (<https://github.com/BurntSushi/xsv>) does to allow multithreaded csv processing is storing the byte offset of start of lines in a preprocessing pass and then a multithreaded second pass. Having start/end of section hooks would also be beneficial for multithreading later down the line.