[ Pobierz całość w formacie PDF ]
.xml_set_element_handlerPodręcznik PHPPoprzedniNastępnyxml_set_element_handler (PHP 3>= 3.6, PHP 4 >= 4.0)xml_set_element_handler -- set up start and end element handlersDescriptionintxml_set_element_handler(int parser, stringstartElementHandler, stringendElementHandler)
Sets the element handler functions for the XML parserparser.startElementHandler andendElementHandler are strings containingthe names of functions that must exist whenxml_parse() is called forparser.
The function named by startElementHandlermust accept three parameters:startElementHandler (int parser, string name, array attribs)parser
The first parameter, parser, is areference to the XML parser calling thehandler.name
The second parameter, name, containsthe name of the element for which this handler is called.Ifcase-folding is ineffect for this parser, the element name will be in uppercaseletters.attribs
The third parameter, attribs, containsan associative array with the element's attributes (if any).The keys of this array are the attribute names, the valuesare the attribute values.Attribute names are case-folded on the samecriteria as element names.Attribute values arenot case-folded.
The original order of the attributes can be retrieved bywalking through attribs the normalway, using each().The first key in thearray was the first attribute, and so on.
The function named by endElementHandlermust accept two parameters:endElementHandler (int parser, string name)parser
The first parameter, parser, is areference to the XML parser calling thehandler.name
The second parameter, name, containsthe name of the element for which this handler is called.Ifcase-folding is ineffect for this parser, the element name will be in uppercaseletters.
If a handler function is set to an empty string, orFALSE, the handler in question is disabled.
TRUE is returned if the handlers are set up, FALSE ifparser is not a parser.Notatka: Zamiast nazwy funkcji może zostaćprzekazana PoprzedniSpis treściNastępnyxml_set_objectPoczątek rozdziałuxml_set_character_data_handler
[ Pobierz całość w formacie PDF ]