5 ms·
You're definitely right, that will work. I guess my point is: the OP seems to be wanting a dynamic way to handle XML at the commandline such that he can handle
by djacobs 16y ago
You're definitely right, that will work. I guess my point is: the OP seems to be wanting a dynamic way to handle XML at the commandline such that he can handle new types of events on the fly by piping together a parser with other Unix filters, etc. Doing things the SAX way implies creating hard and fast (and specific) handlers for each type of event, indicating that you're anticipating these events in advance.
I'm sure some handlers could be generalized a bit (for example, scanning for regular expressions). But I don't think that the SAX/commandline solution is much better than the SAX/program solution.
Am I missing something?