raindog308 has asked for the wisdom of the Perl Monks concerning the following question:
Just tags and elements - no attributes. I figured I'd write an event-based parser, invoking handlers for each tag start and tag end. But what's the best way to write the parser? A state machine? If so, should it go character-by-character (collapse the input down to one line and then process by character)? Or is there a regex-based approach? Yes, I realize this is The Dumb Way to do XML, but that's what's been dropped on my lap.<some_tag> <tag>value</tag> <tag2>value</tag2> </some_tag>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing XML...by hand (ugh)
by Anonymous Monk on Dec 04, 2010 at 02:33 UTC | |
|
Re: Parsing XML...by hand (ugh)
by grantm (Parson) on Dec 05, 2010 at 03:08 UTC | |
|
Re: Parsing XML...by hand (ugh)
by Khen1950fx (Canon) on Dec 04, 2010 at 10:28 UTC | |
|
Re: Parsing XML...by hand (ugh)
by markhh (Novice) on Dec 04, 2010 at 21:52 UTC | |
|
Re: Parsing XML...by hand (ugh)
by Generoso (Prior) on Dec 06, 2010 at 03:37 UTC |