implement an xml parser using state pattern
spxml is a xml parser, supports PULL-model and DOM-model xml parsing.
Using state pattern make it simple to implement the xml parser.
State pattern has three participants:
* Context ( SP_XmlPullParser )
o defines the interface of interest to clients
o maintains an instance of a ConcreteState subclass that
defines the current state.
* State ( SP_XmlReader )
o defines an interface for encapsulating the behavior
associated with a particular state of the Context.
* Concrete State ( SP_XmlStartTagReader, SP_XmlEndTagReader, etc )
o each subclass implements a behavior associated with a state
|All times are GMT. The time now is 04:09 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.