implement an xml parser using state pattern

Discussion in 'C++' started by stephen.nil@gmail.com, Jan 18, 2007.

  1. Guest

    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
    , Jan 18, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    537
    geoff
    Jan 19, 2007
  2. Replies:
    0
    Views:
    351
  3. arne
    Replies:
    0
    Views:
    342
  4. Sean
    Replies:
    3
    Views:
    252
    robic0
    Oct 3, 2006
  5. Sean
    Replies:
    0
    Views:
    358
Loading...

Share This Page