Sign In/My Account | View Cart  
advertisement

Article:
 Non-Extractive Parsing for XML
Subject: Many misunderstandings...
Date: 2004-05-23 11:41:15
From: Brian Ewins
Response to: Many misunderstandings...

It enters because that's what Jimmy was writing about - a java replacement for a java API. Quoting the article:


"Yet most string-to-data conversion macros or functions, e.g. atoi, atof and Java's parseInt assume tokens in the "extractive" sense. To support the new "non-extractive" tokenization, one can create a mirror set of functions, e.g. ne_atoi, ne_atof and ne_parseInt (ne stands for non-extractive). "


thats why I put quotes around "Java's parseInt" in the previous reply - I'd spotted your stuff was in Objective-C, I know you can do better :)


In java even the supposedly high-performance 'standard' APIs (like SAX) use 'String' everywhere, and so can't be zero-copy like Jimmy's proposal; we have to resort to other hacks - eg I wrote a SAX parser once that used a ternary tree-based StringPool for element/attribute names, it massively reduced the number of strings being created - most parsers use java's String.intern() to pool strings instead, which creates masses of garbage to collect.


Anyway I think I've written enough replies to this article... back to work...


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Full Text Titles Only Newest First

Sponsored By: