I needed a statemachine for a dtd validator and an xml parser so I though why not describe the states using xml and generate the parser code.

Since the whole point was to make an xml parser the easiest and most fun was simply to use the xml parser available in .NET.

Statemachine table generator source and its input dtd.

My dtd statemachine and output.