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

Karl Waclawek karl at waclawek.net
Tue Apr 12 23:50:11 CEST 2005



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!

Not necessarily. You may have multiple character data call-backs
for that element, interleaved with start/end tags for child elements.
You must - as someone else explained - maintain a stack so that
you know which element a character data call-back belongs to.

Karl


More information about the Expat-discuss mailing list