This is a classic example of where to use a finite state machine:

<http://en.wikipedia.org/wiki/Finite_state_machine>

Basically, you have an initial state and then an "inside country"
state. Then inside your
parser:didEndElement:namespaceURI:qualifiedName: you behave
differently based on the current state.
thanks Stephen for your kind response. I think i've grasp the theory, but i am not qite sure about the best way to implement the algorithm. Perhaps to set a flag to indicate wether the "country" object is the root one or the nested one? Again, thanks. _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to