XML_SetElementHandler - Set functions for elements handler
The function calling sequence can be :
The function calling sequence can be :
with data the user data, el a string given the name of the the tag, and el a matrix of strings that gives names and values of attributes of the tag.
This function set the user functions that will be called during the parsing of XML. 'start_hdl' defines the Scilab function name that will be called when encountering an input XML tag. 'end_hdl' defines the Scilab function name that will be called when encountering an ending XML tag. The XML pointer must be created with XML_ParserCreate. The input strings must be a valid Scilab functions 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 %ptr=XML_ParserCreate(); XML_SetElementHandler(%ptr,'start_handl','end_handl'); XML_Parse(%ptr, txt);
XML_ParserCreate, XML_ParserFree, XML_SetUserData, XML_SetCharDataHandler, XML_Parse, XML_Conv2Latin, XML_StopParser, XML_ResumeParser,
'The Expat XML Parser', Available: http://expat.sourceforge.net/