[FoRK] Alternatives to XML config files... a hack

Ken Meltsner meltsner at gmail.com
Fri Feb 25 09:18:08 PST 2005


Interesting trick.  The replaceable scanner idea's not new, but the
last one I saw replaced the SAX parser:

http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/?page=6

"It turns out that writing a SAX parser is quite easy (our examples
use SAX 2). All a SAX parser does is read an XML file top to bottom
and fire event notifications as various elements are encountered. In
our custom parser, we will read the CSV file top to bottom, firing SAX
events as we read the file. A program listening to those SAX events
will not realize that the data file is CSV rather than XML; it sees
only the events. ..."

Now, you need to write a version that reads Windows-style .ini files...

Ken


More information about the FoRK mailing list