config root man

Current Path : /usr/opt/php72/share/pear/doc/XML_Parser/examples/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/php72/share/pear/doc/XML_Parser/examples/xml_parser_funcmode.php

<?PHP
/**
 * Example for the func-mode
 *
 * @author      Stephan Schmidt <schst@php-tools.net>
 * @package     XML_Parser
 * @subpackage  Examples
 */

/**
 * require the parser
 */
require_once '../Parser.php';

class myParser extends XML_Parser
{
    function xmltag_foo_bar($xp, $name, $attribs)
    {
        print "handle start foo-bar\n";
    }

    function xmltag_foo_bar_($xp, $name)
    {
        print "handle end foo-bar\n";
    }

    function xmltag_foo($xp, $name)
    {
        print "handle start foo\n";
    }

    function xmltag_foo_($xp, $name)
    {
        print "handle end foo\n";
    }
}

$p = &new myParser(null, 'func');

$result = $p->setInputString('<foo><foo-bar/></foo>');
if (PEAR::isError($result)) {
    print $result->getMessage() . "\n";
}
$result = $p->parse();
if (PEAR::isError($result)) {
    print $result->getMessage() . "\n";
}
?>

Man Man