package.xml 0000644 0001750 0001750 00000042133 11461312050 013753 0 ustar clockwerx clockwerx
XML_Parserpear.php.netXML parsing class based on PHP's bundled expatThis is an XML parser based on PHPs built-in xml extension.
It supports two basic modes of operation: "func" and "event". In "func" mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in "event" mode it uses a set of generic callbacks.
Since version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements.
Furthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it.Stephan Schmidtschstschst@php-tools.netnoChuck Burgessashnazgashnazg@php.netyesStig Sæther Bakkenssbstig@php.netnoTomas V.V.Coxcoxcox@php.netno2010-10-261.3.41.3.0stablestableBSD License
Remove package.php from release
4.2.01.4.0b1PEARpear.php.net1.1.0beta11.1.0beta1betabeta2004-04-16PHP License
- Fixed memory leaks parsing many documents or big files (mroch)
- Fixed setInput() url detection regex (mroch)
- Added setInputString() method, allowing strings to be passed as input (schst)
- Error handling rewritten (cox)
- Increased the overall parsing speed (cox)
- Added free() method (schst
- Added reset() method, that is called when parsing a document so it is possible to parse more than one document per instance (schst)
- Added error codes (schst)
- revamped documentation (cox, schst)
- Fixed bug #516 (url fopen and safe mode) (schst)
- Fixed bug #637 (dependency on PEAR) (schst)
- improved parse() and parseString() to be able to parse more than one document (schst)
- added PHP5 constructor (schst)
- moved xml_parser_create() to _create() for PHP5 compatibility (schst)
- added dependency on PHP 4.2
Thanks to Marshall Roch for commments and contributions and Tomas V.V. Cox
for applying a lot of fixes and improvements.
1.1.0beta21.1.0beta2betabeta2004-04-18PHP License
beta2:
- Fixed calling of __construct
beta1:
- Fixed memory leaks parsing many documents or big files (mroch)
- Fixed setInput() url detection regex (mroch)
- Added setInputString() method, allowing strings to be passed as input (schst)
- Error handling rewritten (cox)
- Increased the overall parsing speed (cox)
- Added free() method (schst
- Added reset() method, that is called when parsing a document so it is possible to parse more than one document per instance (schst)
- Added error codes (schst)
- revamped documentation (cox, schst)
- Fixed bug #516 (url fopen and safe mode) (schst)
- Fixed bug #637 (dependency on PEAR) (schst)
- improved parse() and parseString() to be able to parse more than one document (schst)
- added PHP5 constructor (schst)
- moved xml_parser_create() to _create() for PHP5 compatibility (schst)
- added dependency on PHP 4.2
Thanks to Marshall Roch for commments and contributions and Tomas V.V. Cox
for applying a lot of fixes and improvements.
1.1.01.1.0stablestable2004-04-23PHP License
- Fixed memory leaks parsing many documents or big files (mroch)
- Fixed setInput() url detection regex (mroch)
- Added setInputString() method, allowing strings to be passed as input (schst)
- Error handling rewritten (cox)
- Increased the overall parsing speed (cox)
- Added free() method (schst
- Added reset() method, that is called when parsing a document so it is possible to parse more than one document per instance (schst)
- Added error codes (schst)
- revamped documentation (cox, schst)
- Fixed bug #516 (url fopen and safe mode) (schst)
- Fixed bug #637 (dependency on PEAR) (schst)
- improved parse() and parseString() to be able to parse more than one document (schst)
- added PHP5 constructor (schst)
- moved xml_parser_create() to _create() for PHP5 compatibility (schst)
- added dependency on PHP 4.2
Thanks to Marshall Roch for commments and contributions and Tomas V.V. Cox
for applying a lot of fixes and improvements.
1.2.0beta11.2.0beta1betabeta2004-05-17PHP License
added new class XML_Parser_Simple that provides a stack for the elements so the user only needs to implement one method to handle the tag and cdata.
1.2.0beta21.2.0beta2betabeta2004-05-24PHP License
XML_Parser:
- fixed bug with setMode()
- moved the init routines for the handlers in _initHandlers()
XML_Parser_Simple:
- fixed bug with character data (did not get parsed)
- fixed bug with setMode()
- some refactoring
- added getCurrentDepth() to retrieve the tag depth
- added addToData()
- added new example
1.2.0beta31.2.0beta3betabeta2004-05-25PHP License
- added setHandlerObj() which allows you to have the parser separate from the handler methods
1.2.01.2.0stablestable2004-05-28PHP License
- added setHandlerObj() which allows you to have the parser separate from the handler methods
- fixed bug with setMode()
- moved the init routines for the handlers in _initHandlers()
- added new examples
- fixed test files so they do not fail because of different resource ids
XML_Parser_Simple:
- added new class XML_Parser_Simple that provides a stack for the elements so the user only needs to implement one method to handle the tag and cdata.
1.2.11.2.1stablestable2004-10-04PHP License
fixed bug #2442: Call to "xmltag_ELEMENT_" not correctly managed in function funcEndHandler
1.2.2beta11.2.2beta1betabeta2004-12-22PHP License
- fixed small notice in XML_Parser::free(),
- fixed Bug #2939: bug in error routine leads to segmentation fault (raiseError does not free the internal resources anymore)
1.2.21.2.2stablestable2004-12-22PHP License
- fixed small notice in XML_Parser::free(),
- fixed Bug #2939: bug in error routine leads to segmentation fault (raiseError does not free the internal resources anymore)
1.2.31.2.3stablestable2005-01-17PHP License
- fixed a bug that occured when using 'func' mode and setHandlerObj() (schst)
- added default handlers for 'func' mode (schst)
1.2.41.2.4stablestable2005-01-18PHP License
- fixed a bug in XML_Parser_Simple when trying to register more than the default handlers and a separate callback object (schst)
1.2.51.2.5stablestable2005-02-26PHP License
- fixed Bug #3557 (removed $attribs parameter, which caused a notice)
- fixed Bug #3277 (remove obsolete ini_set('allow_url_fopen'))
1.2.61.2.6stablestable2005-03-25PHP License
- fixed Bug #3949: reset does not return true on success as the documentation states
- implement Request #3905: replace "." with "_" in tagnames when using func mode
1.2.71.2.7stablestable2005-09-24PHP License
- implemented request #4774: Error message contains column number
1.2.81.2.8stablestable2006-12-01PHP License
- fixed bug #5557: Raise a more useful error message when using invalid source encoding
- fixed bug #6078: func-mode does not handle all allowed letters in tags
1.3.0a11.3.0a1alphaalpha2008-08-24PHP License
- switch to BSD License
- switch to package.xml v2
- PEAR CS cleanup
- Fix Doc #13120: Mistake in example code
1.3.01.3.0stablestable2008-08-24PHP License
- switch to BSD License
- switch to package.xml v2
- PEAR CS cleanup
- Fix Doc #13120: Mistake in example code
1.3.11.3.0stablestable2008-09-15BSD License
- correct package.xml to reflect switch to BSD License
1.3.21.3.0stablestable2009-01-21BSD License
- Fix Bug #9328: assigned by reference error in XML_RSS parse
- add an AllTests.php for PHPUnit usage
1.3.31.3.0stablestable2010-10-25BSD License
Automatically built QA release
Bug #16467 Unit tests are broken - ashnazg
Bug #17725 Patch Avoid deprecated eregi functions - olleolleolle
1.3.41.3.0stablestable2010-10-26BSD License
Remove package.php from release
XML_Parser-1.3.4/examples/xml_parser_file.php 0000600 0001750 0001750 00000002032 11461312050 021737 0 ustar clockwerx clockwerx
* @package XML_Parser
* @subpackage Examples
*/
/**
* require the parser
*/
require_once 'XML/Parser.php';
class myParser extends XML_Parser
{
function myParser()
{
parent::XML_Parser();
}
/**
* handle start element
*
* @access private
* @param resource xml parser resource
* @param string name of the element
* @param array attributes
*/
function startHandler($xp, $name, $attribs)
{
printf('handle start tag: %s ', $name);
}
/**
* handle start element
*
* @access private
* @param resource xml parser resource
* @param string name of the element
* @param array attributes
*/
function endHandler($xp, $name)
{
printf('handle end tag: %s ', $name);
}
}
$p = &new myParser();
$result = $p->setInputFile('xml_parser_file.xml');
$result = $p->parse();
?> XML_Parser-1.3.4/examples/xml_parser_file.xml 0000600 0001750 0001750 00000000127 11461312050 021753 0 ustar clockwerx clockwerx content of bartest