X7ROOT File Manager
Current Path:
/usr/share/doc/cpanel-php81-xml-parser-1.3.8/examples
usr
/
share
/
doc
/
cpanel-php81-xml-parser-1.3.8
/
examples
/
📁
..
📄
xml_parser_file.php
(1.03 KB)
📄
xml_parser_file.xml
(87 B)
📄
xml_parser_funcmode.php
(875 B)
📄
xml_parser_handler.php
(1022 B)
📄
xml_parser_simple1.php
(1.06 KB)
📄
xml_parser_simple1.xml
(207 B)
📄
xml_parser_simple2.php
(1.27 KB)
📄
xml_parser_simple2.xml
(152 B)
📄
xml_parser_simple_handler.php
(1.24 KB)
Editing: xml_parser_simple1.php
<?PHP /** * example for XML_Parser_Simple * * $Id$ * * @author Stephan Schmidt <schst@php-tools.net> * @package XML_Parser * @subpackage Examples */ /** * require the parser */ require_once 'XML/Parser/Simple.php'; class myParser extends XML_Parser_Simple { function myParser() { $this->XML_Parser_Simple(); } /** * handle the element * * The element will be handled, once it's closed * * @access private * @param string name of the element * @param array attributes of the element * @param string character data of the element */ function handleElement($name, $attribs, $data) { printf('handling %s in tag depth %d<br />', $name, $this->getCurrentDepth()); printf('character data: %s<br />', $data ); print 'Attributes:<br />'; print '<pre>'; print_r( $attribs ); print '</pre>'; print '<br />'; } } $p = &new myParser(); $result = $p->setInputFile('xml_parser_simple1.xml'); $result = $p->parse(); ?>
Upload File
Create Folder