NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
SAX (Score:2)
Not that you'd re-write all this now you have
Re:SAX (Score:1)
Perl & XML has a chapter on SAX. I'll start there, and I have ordered the New Riders book. Let me know if you have more recommendations for good SAX tutorials or documentation! Otherwise I'll just start slogging through XML::SAX::Intro and friends.
As I mentioned, I am particularly interested in exploiting the symmetry between reading and writing a quasi-flat (lumpy?) file. Is there a trick that will let me accomplish this? The existance of such a trick would be a light at the end of the tunnel for me.
I would like to be able to create a SAX driver for my non-XML source that can do this. This would enable me to change the code in only one place when I need to fix a bug or adapt to changes in the quasi-flat file format. As my code stands now, I will have to change both the reader and the writer.
Thanks,
-toma
It should work perfectly the first time! - toma
Reply to This
Parent
Re:SAX (Score:2)
However there's nothing stopping you unifying some of the code if it's relevant to do that. You could put functions that you would use for both reading and writing in a separate package.
A good example to look at for readers is Pod::SAX. Also check out XML::Generator::DBI. As far as writers go, there's not much detail on them. I tend t