note 56067 added to function.xml-set-character-data-handler
| From: | wako057 at gmx dot fr | Date: | Mon, 22 Aug 2005 16:39:25 +0000 |
| Subject: | note 56067 added to function.xml-set-character-data-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94034@lists.php.net to get a copy of this message | ||
That give an example about the note.
When you are creating a class and you need to use a method of your class to the function
xml_set_character_data_handler that is the way to point give the method:
class example
{
function example()
{
}
function data($parseur, $texte)
{
switch ($this->derniereBaliseRencontree)
{
case "TITLE":
-----
break;
case "LINK"
-----
break;
case "DESCRIPTION":
-----
break;
}
}
function fetchOpen($parseur, $nomBalise, $tableauAttributs)
{
----------------
}
function fetchClose($parseur, $nomBalise)
{
----------------
}
function ZZZ()
{
$parseurXML = xml_parser_create();
xml_set_element_handler($parseurXML, Array(&$this, 'fetchOpen'),
Array(&$this, 'fetchClose'));
---------------- <IMPORTANT> --------------------------
xml_set_character_data_handler($parseurXML, Array(&$this, 'data'));
---------------- </IMPORTANT> --------------------------
}
----
Manual Page -- http://www.php.net/manual/en/function.xml-set-character-data-handler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56067
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56067&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56067&report=yes
Search -- http://master.php.net/manage/user-notes.php