[Expat-discuss] How do I convert an XML_Parse object to an array

Nick MacDonald nickmacd at gmail.com
Tue Apr 12 22:59:44 CEST 2005


Well almost... but not quite.  What you really want to do is implement
a stack (the data structure.)  As you encounter a start tag, you push
it onto the stack.  As you encounter and end tag, you pop the stack. 
That way you know exactly where in the document you are, just by
walking your stack.

On Apr 12, 2005 10:01 AM, steve.gutter at kroger.com
<steve.gutter at kroger.com> wrote:
> Thanks for the info. The key seems to be you just need to keep track of
> what was
> the last start tag encountered, and then each time you hit a handler for
> the SetCharacterDataHandler
> immediately after a start tag, that's the data corresponding to that start
> tag!

-- 
Nick MacDonald
NickMacD at gmail.com


More information about the Expat-discuss mailing list