Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   implement an xml parser using state pattern (http://www.velocityreviews.com/forums/t459891-implement-an-xml-parser-using-state-pattern.html)

stephen.nil@gmail.com 01-18-2007 10:26 AM

implement an xml parser using state pattern
 
http://code.google.com/p/spxml/
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
of Context



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.