It says # FIXME this state machine wouldn't be necessary if we had a DTD.
I don't understand (not too familiar with XML::Parser, but I get the general idea of needing the handler subroutines). How would a XML DTD (because there does exist DTDs and XSDs for XML-RPC) be of any use in removing the if-elsif-else chain?
I'm trying to simplify the code for decoding XML-RPC calls/responses -- i.e. the subroutine decode. As far as I know, Frontier::RPC2 is the fastest Perl xmlrpc decoder available on CPAN, but looking at the code it looks like it code be significantly improved (?))
Side question: doe having an empty sub sub {} for the Proc handler subroutine do anything? Or can it be left out?
EDIT: To be clear, I know what a DTD is. Sorry I didn't clarify. I want to know why it would actually be useful. Because from my current understanding, wouldn't a state machine be needed regardless of the DTD? Or is there some sort of 'plug-in' for the DTD in XML::Parser I'm unaware of?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |