CharacterData(p, s$)
s$
parameter.
Note that the character data for a single XML element might be passed to your
callback in several separate chunks so make sure your code doesn't depend
on getting all of the character data at once. By default, the XML plugin tries
to merge character data into as few chunks of text as possible. You can turn off
the merging functionality by passing False
in the optional third argument in your
call to xml.CreateParser(). Note that even with the merge data option
enabled (which is the default) it isn't guaranteed that all data will come in
at once so be prepared to handle this correctly.
Function p_CharacterData(p, s$) DebugPrint(s$) EndFunction p = xml.CreateParser({CharacterData = p_CharacterData}) p:Parse([[<app>Hollywood</app>]]) p:Free()The code above will print "Hollywood".