implement an xml parser using state pattern

S

stephen.nil

http://code.google.com/p/spxml/
spxml is an 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top