diff options
author | SVN Migration <svn@php.net> | 2003-02-27 17:43:39 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2003-02-27 17:43:39 +0000 |
commit | 078bcec0997ad0e07b720c43cc9e6d0e046a75ab (patch) | |
tree | 36cb0f6be2ef078fe3374de8c087b93ecf82f812 /scripts/ext_skel_ng/xml_stream_parser.php | |
parent | fd61f69077f6156ca71dde60ecfd9ed9765a02db (diff) | |
download | php-git-PHP-5.tar.gz |
This commit was manufactured by cvs2svn to create branch 'PHP_5'.PHP-5
Diffstat (limited to 'scripts/ext_skel_ng/xml_stream_parser.php')
-rw-r--r-- | scripts/ext_skel_ng/xml_stream_parser.php | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/scripts/ext_skel_ng/xml_stream_parser.php b/scripts/ext_skel_ng/xml_stream_parser.php deleted file mode 100644 index 626c50b154..0000000000 --- a/scripts/ext_skel_ng/xml_stream_parser.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -class xml_stream_parser { - var $parser; - - function xml_stream_parser($stream) - { - if(!is_resource($stream)) die("not a stream"); - if(get_resource_type($stream) != "stream") die("not a stream"); - - $this->parser = xml_parser_create(); - - xml_set_object($this->parser, $this); - xml_set_element_handler($this->parser, "tag_open", "tag_close"); - xml_set_character_data_handler($this->parser, "cdata"); - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); - - while(!feof($stream)) { - xml_parse($this->parser, fgets($stream), feof($stream)); - } - xml_parser_free($this->parser); - } - - function tag_open($parser, $tag, $attributes) - { - var_dump($parser, $tag, $attributes); - } - - function cdata($parser, $cdata) - { - var_dump($parser, $cdata); - } - - function tag_close($parser, $tag) - { - var_dump($parser, $tag); - } - - function error($msg) { - die("$msg in line ".xml_get_current_line_number($this->parser)); - } -} // end of class xml -?>
\ No newline at end of file |