(Maarten Verhage) wrote:
# Hi All,
#
# I've made a modified version of the Expat elements.c example. What I
# want the program to do is to recognize a hardcoded
# element-name/tag-name and then execute some code which has access to
# the data(e.g. "Maarten Verhage" in XML file).
#
# The current situation (problem) is:
#
# 1. The XML parser calls the function startElement when it finds a tag,
# in this function I don't have access to the data between the tags.
#
# 2. The XML parser calls the function charHandler when it finds data,
# in this function I don't have access to the tag-name.
# int *depthPtr = userData;
Instead if just an integer, set the user data to a structure, and pass
information among the callbacks with this structure.
http://www.rawbw.com/~wyrmwif/html/wyrm-expat.html#16
is an example of the kind of callback structure that can be used.
--
SM Ryan
http://www.rawbw.com/~wyrmwif/
This is one wacky game show.