"Etienne Philip Pretorius"
XML Specification:
document := prolog element Misc*
IE 3 distinct states.
First state 'prolog': xml declaration (maximum of 1 occurence) OR comment (no upper limit) OR process instruction (no upper limit) OR white space (no upper limit)
Including 'start element' and 'empty element' as to detect state transition from prolog to element according to the above definition.
The event to fire that of is well a range of bytes that will match 'prolog' and if it does not match anything or matches xml declaration more than once and error should be thrown.
So at a high level the state machine is keeping track on what I would expect to be my next set of valid xml entity constructs.
The only way that the state machine knows that it must 'advance' to the next state is when I pass the iterators for the content is needs to search and it matches the conditions for it to advance.
Hmmm, you are probably using the wrong tool. Although you can use Boost.Statechart for parsing, I would definitely not recommend it. It is too heavy-weight for such a task. Boost.Spirit will almost certainly lead to better results. HTH, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.