XML_SetCharDataHandler - Set function for XML strings handler
The function calling sequence can be :
with data the user data and txt a vector of strings that gives the text enclosed in Xml tags.
This function set the user functions that will be called during the parsing of XML. 'char_hdl' defines the Scilab function name that will be called for the text inside XML tags. The XML pointer must be created with XML_ParserCreate. The input string must be a valid Scilab function name.
txt = mgetl('SCI/man/eng/expatsci/XML_Parse.xml'); //def start_hndl function []=start_handl(el,attr) printf("Begin of %s \n",el); endfunction //def end_hndl function []=end_handl(el) printf("end of %s \n",el); endfunction //def char_hndl function []=char_handl(txt) printf("%s \n",txt) endfunction %ptr=XML_ParserCreate(); XML_SetElementHandler(%ptr,'start_handl','end_handl'); XML_SetCharDataHandler(%ptr,'char_handl'); XML_Parse(%ptr, txt);
XML_ParserCreate, XML_ParserFree, XML_SetUserData, XML_SetElementHandler, XML_Parse, XML_Conv2Latin, XML_StopParser, XML_ResumeParser,
'The Expat XML Parser', Available: http://expat.sourceforge.net/