c*****t 发帖数: 1879 | 1 When I looked at StAx, I couldn't help wondering. How many people
actually liked to build state machines by hand? Or my understanding
is wrong? Anyone used it?
Thanks. | t*******e 发帖数: 684 | 2 Are you talking about the XML stream parser? Why do you link it up with
state machines? | c*****t 发帖数: 1879 | 3 No, what I mean is that when I read the tutorial, it has pieces like:
public final static String getEventTypeString(int eventType)
{
switch (eventType)
{
case XMLEvent.START_ELEMENT:
return "START_ELEMENT";
case XMLEvent.END_ELEMENT:
..
}
}
This is building a state machine (manually build rather than generated
in this case).
Just like using SAX, doesn't matter that it is event driven, you are
still building a state machine by hand.
【在 t*******e 的大作中提到】 : Are you talking about the XML stream parser? Why do you link it up with : state machines?
|
|