The SAFOX package is a collection of light-weight API for object-oriented PHP to handle XML files.
As of version 0.5 the SAFOX wrapper is the starting point for all SAFOX operations. It is an extreme light weight class that allows to create any of the SAFOX objects (XMLDoc, XMLParser, RSSDoc, RSSParser) without further include or require commands. All necessary libraries of the SAFOX API will be loaded only when/if the file is required, thus making scripts lighter and faster.
Providing three base classes, XMLDoc, XMLNode, XMLParser, and extended RSSDoc and RSSParser Classes for RSS 2.0 Handling, the SAFOX package allows an easy and clean way to handle all kind of XML files. The SAFOX package is currently developed in PHP4.X and copyright by Christian Hansel, cpi service, Leipzig. The code is provided under the GNU Public License Version 2 and may freely be used, modified, and distributed with original copyright notices to be maintained.
If no copy of the license is provided check http://www.gnu.org/licenses/gpl2.txt
The SAFOX Package consists of five files:
- safox.cls.php -- A OOP wrapper for all SAFOX objects which loads one or more of the following files only when required
- safox_g.cls.php -- Provides the XMLDOc & XMLNODE Classes
- safox_p.cls.php -- Provides a simple, light-weight, but strong Parser for XML Documents that returns a XMLDOC Object
The SAFOX_RSS sub package consists of two files but requires the SAFOX Base classes: - safox_g_rss.cls.php -- Provides the RSSDOc & RSSNODE Classes
- safox_p_rss.cls.php -- Provides a simple, light-weight, but strong Parser for XML Documents that returns a XMLDOC Object
This is the Parsing Base Library for OOP-parsing of xml files to retrieve OOP object (XMLDoc)
Events fired during Parsing are:
XPE_ON_PARSE_DEF - Event On Parsing
XPE_ON_PARSE_DTD - On Parsing DTD
XPE_ON_PARSE_TAG - On Parsing TagName/Type of Node
XPE_ON_PARSE_ATT - On Parsing Attribute String
XPE_ON_PARSE_CDT - On Parsing CDATA/content of node
XPE_ON_PARSE_NOD - On Node Parsing Completed Object
XPE_ON_PARSE_CMT - On Parsing a Comment
XPE_ON_PARSE_XSP - On Parsing XML Specific Tags ?> *
see the documented onParseCDATA function that is by default registered as eventhandler for XPE_ON_PARSE_CDT for further information and an explanatory example full api documentation and examples available at http://www.cpi-service.com/safox/Changes History : version 0.5
- The SAFOX library has been reorganised and now requires only one wrapper file (safox.cls.php)
- added subpackage SAFOX_RSS provides two classes RSSDoc and RSSParser for the generation and parsing of RSS 2.0
- added Feature: setEntityConversion is a function that specifies whether or not special characters in CDATA
should be converted into HT/XML-Entities (e.g. & into &, ' into ' ...)
(true) or enclosed into CDATA tags (false)
version 0.42 - BUGFIX 20051130-2 fixes a problem where comments containing tags caused the the parser to break
version 0.41 of SAFOX package includes changes - BUGFIX 20051130 Code Cleanup provided by Cristiano Degiorgis [cri@webprofessor.it]
Changes History : version 0.4 of SAFOX package includes changes - BUGFIX 20051128 that fixes problems with removing nodes from the document
- remove, and delete methods added as aliases to destroy in XMLNode class
- method cleanUP added to XMLDoc class
- method cleanUP added to XMLNode class - see destription
Changes History : version 0.3 of SAFOX package includes changes - BUGFIX 20051123 corrects a problem that was caused when a repeated call to setId of child Nodes was made
- addNodeAfter Method added to XMLDoc Class
- addNodeAfter Method added to XMLNode Class
- addNodeBefore Method added to XMLDoc Class
- addNodeBefore Method added to XMLNode Class
version 0.2 of SAFOX package includes changes - getchildNodeByTagName() Method added to XMLDOC
- writeToFile Method added to XMLDOC
- BUGFIX 20051117 in xmlParser - corrects a mishandling of <![CDATA[ .. ]]> enclosed tag content that
caused the parser to break when dealing with tags within the CDATA
| Copyright: | (c) 2003-2005 CVH, cpi-service |
| File: | safox_p.cls.php |
| Date: | 2005-11-28 |
| Version: | 0.5 |
| Link: | http://www.cpi-service.com |
| License: | GPL2 |
| Author: | CVH, cpi-service ; cvh@cpi-service.com |