package.xml 0000644 0001750 0001750 00000065520 11461374326 013776 0 ustar clockwerx clockwerx
XML_Serializerpear.php.netSwiss-army knife for reading and writing XML files. Creates XML files from data structures and vice versa.XML_Serializer serializes complex data structures like arrays or object as XML documents.
This class helps you generating any XML document you require without the need for DOM.
Furthermore this package can be used as a replacement to serialize() and unserialize() as it comes with a matching XML_Unserializer that is able to create PHP data structures (like arrays and objects) from XML documents, if type hints are available.
If you use the XML_Unserializer on standard XML files, it will try to guess how it has to be unserialized. In most cases it does exactly what you expect it to do.
Try reading a RSS file with XML_Unserializer and you have the whole RSS file in a structured array or even a collection of objects, similar to XML_RSS.
Since version 0.8.0 the package is able to treat XML documents similar to the simplexml extension of PHP 5.Stephan Schmidtschstschst@php-tools.netnoChuck Burgessashnazgashnazg@php.netyes2010-10-260.20.20.20.0betabetaBSD License
Bug #17994 Installed into wrong path
4.2.01.4.0b1XML_Utilpear.php.net1.1.1XML_Parserpear.php.net1.2.6PEARpear.php.netxml0.20.2betabeta2003-08-03BSD License
inital release
0.40.4betabeta2003-08-12BSD License
added Unserializer
removed bug with object typehint
removed bug with unnameditem w/o _originalKey attribute
uses XML_Util to validate tagname
serializer does not break on resources anymore
added support for __sleep() and __wakeup()
0.50.5betabeta2003-08-14PHP License
Unserializer is now able to unserialize XML files w/o type hints by automatically transforming multiple occurences of the same tag to an indexed array
This is now similar to ext/simpleXML in PHP5 that means it can be used to parse any XML file, try it with your favorite RSS feed
0.60.6betabeta2003-08-21PHP License
Unserializer is able to return the name of the root tag,
added 'complexType' option to XML_Unserializer,
added possibility to create nested objects from any XML file,
tagname is used as classname if no other class is specified,
added 'overrideOptions' option that can be used to restore the default options for a serialization,
added 'keyAttribute' option to XML_Unserializer,
added Todo list
0.80.8betabeta2003-09-23PHP License
XML_Serializer:
* added option: scalarAsAttribute to create tags with attributes from an array or object,
* added option: prependAttributes to enable a prepend string for attributes (ensure they are different from type hints),
* added option: attributeIndent to allow multiline tags, if a tag has several attributes; this makes it easier to read (requested by Yavor Shahpasov),
* now requires XML_Util 0.4.1 or newer,
* added option: mode => simplexml, allows you to serialize indexed arrays like simpleXML of PHP5 does: tags use name of the parent structure and are in the same depth (this is still in alpha state, not thoroughly tested)
XML_Unserializer:
* added option: parseAttributes which allows you to parse tags with attributes,
* added option: attributesArray to specify the name of the array in which attributes should be stored,
* added option: prependAttributes to specify a prepend string for the generated array keys,
* added option: contentName to specify the key for the content of a tag that contains also attributes
* added option: tagMap, to change the names of the tags while parsing
Both:
* removed bug that occured when instantiating w/o options (reported by Alan Knowles),
* added options: keyAttribute, typeAttribute and classAtribute to allow user to specify attribute names for typehints,
* added resetOptions(),
* added setOption(),
* added option: overrideOptions that allows you to reset to defaults for one call of serialize or unserialize,
* added some very small docs to defaultOptions arrays
0.8.10.8.1betabeta2003-09-23PHP License
Bugfix release
XML_Serializer:
* removed bug when using mode => simplexml and indexed arrays contained only scalar values,
* removed bug with missing _originalKey attribute when serializing objects
XML_Unserializer:
* added check for set{$propName} method to use methods to set properties in Unserializer instead of direct access
0.90.9betabeta2003-10-13PHP License
XML_Serializer:
+ added support for doctype declaration (requested by Lapo 'Raist' Luchini),
* changed tagName option to rootName option (tagName is still supported but deprecated),
+ added rootAttributes option (thanks to Lapo 'Raist' Luchini),
+ added rootName option for serializing objects
XML_Unserializer:
* removed bug with unserializing aggregated objects
0.9.10.9.1betabeta2003-10-26PHP License
fixed bug #105
0.9.20.9.2betabeta2004-04-23PHP License
fixed invalid multiple call to XML_Parser constructor
0.10.00.10.0betabeta2004-05-24PHP License
- fixed bug #1478 (Array to string conversion)
- fixed bug #170 (RDF examples produce incorrect code)
- added new options to XML_Serializer: attributesArray and contentName to match XML_Unserializer
0.10.10.10.1betabeta2004-07-12PHP License
fixed bug #1846 (unserialization bug with empty arrays)
0.11.00.11.0betabeta2004-08-24PHP License
Serializer:
- Request #2019 (use classname as tagname in indexed arrays)
- replaced double quotes with single quotes
- some CS fixes
Unserializer:
- added new option 'forceEnum'
- replaced double quotes with single quotes
0.11.10.11.1betabeta2004-08-25PHP License
Serializer:
- fixed bug with default line endings
0.12.00.12.0betabeta2004-11-03PHP License
Serializer:
- added new option tagMap (requested by Toby)
Unserializer:
- added encoding option (thanks to mc[at]glouglou[dot]net)
0.13.00.13.0betabeta2004-11-06PHP License
Serializer:
- fixed bug #2688: in simplexml mode $array needs to be non-empty (thanks to demian[at]phpkitchen[dot]com and derek[at]hostbaby[dot]com)
Unserializer:
- implemented Request #2650: Multiple key attributes
0.13.10.13.1betabeta2004-11-26PHP License
Serializer:
- fixed error handling (suppress error handling, when XML_Util returns an error) (patch by Lukas Smith)
- replaced some left-over tabs with spaces
0.14.00.14.0betabeta2004-12-22PHP License
Serializer:
- new option 'encodeFunction' to apply a PHP function to character data and attributes before serializing the data
Unserializer:
- Does no longer extend XML_Parser (allows to change encoding at runtime), this could break some scripts
- new option 'targetEncoding' to specify the target encoding for character data
- new option 'decodeFunction' to apply a PHP function on character data and attributes while unserializing the document
- some tiny whitespace fixes
Global:
- new requires XML_Parser 1.2.2 and XML_Util 1.1.0
0.14.10.14.1betabeta2004-12-27PHP License
Bugfix release:
- XML_Unserializer now again extends PEAR to use PEAR error management
0.15.00.15.0betabeta2005-02-12PHP License
XML_Serializer:
- added option to return the result directly from serialize()
XML_Unserializer:
- added option to return the result directly from unserialize(),
- added defaultClass option
- added tagAsClass option (fixes Bug #3303)
- fixed bug (tag name was not used as classname when tag was empty)
0.16.00.16.0betabeta2005-06-05PHP License
XML_Serializer:
- introduced constants for all options (this helps avoiding typos in the option names)
- deprecated option 'tagName' is no longer supported, use XML_SERIALIZER_OPTION_ROOT_NAME (or rootName) instead
- implement Request #3762: added new ignoreNull option to ignore properties that are set to null when serializing objects or arrays
- fixed bug with encoding function
- use new header comment blocks
XML_Unserializer:
- fix bug #4075 (allow tagMap option to influence any kind of value)
0.17.00.17.0betabeta2005-09-24PHP License
XML_Serializer:
- fixed bug #4575: use the return values of __sleep() when serializing objects
- allow XML_SERIALIZER_OPTION_DEFAULT_TAG to be set as array to set different default tags based on the surrounding tag
- allow XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES to be set as array to selectively use scalar values as attributes
- allow scalar values as first argument to serialize()
- implemented request #3180: Add option to create cdata sections
XML_Unserializer:
- added constants for all options
- fixed bug #5187: decode function should decode cdata instead of the element name
- implemented request #3700: Treatment of whitespace can be influenced via an option
0.18.00.18.0betabeta2005-10-02PHP License
XML_Serializer:
- Allow the use of '#default' whenever one wants to specify an option for any other key
- fixed bug #4575 for real: XML_Serializer now expects __sleep() to return an array of property names
XML_Unserializer:
- Added new IGNORE_KEYS option to specify a list of tags which will not be unserialized using their names as keys
- Added new GUESS_TYPE option to automatically convert the data to the best matching type
- Allow COMPLEXTYPE to be an array to be able to unserialize to arrays or objects
- Allow the use of '#default' whenever one wants to specify an option for any other tag
0.19.0a10.19.0a1alphaalpha2008-08-24BSD License
- switch to package.xml v2
- PEAR CS cleanup
- Req #13856: License Change from PHP to BSD [ashnazg]
- Bug #8048: Entities are not replaced in tags with attributes [schst]
- Doc #12725: tuto link no more available
0.19.00.19.0betabeta2008-09-15BSD License
- switch to package.xml v2
- PEAR CS cleanup
- Req #13856: License Change from PHP to BSD [ashnazg]
- Bug #8048: Entities are not replaced in tags with attributes [schst]
- Doc #12725: tuto link no more available
0.19.10.19.1betabeta2008-10-21BSD License
- Bug #14653: testNumberedObjects testcase fails [ashnazg]
- Doc #8650 : Missing Information in the Manual [ashnazg]
- Doc #13896: Bad info in the RSS feed tutorial [ashnazg]
0.19.20.19.2betabeta2009-01-24BSD License
- Bug #15602: attributes don't get escaped sometimes [lapo]
0.20.00.20.0betabeta2010-09-04BSD License
- Request #13564: bool(false) is converted to empty string
0.20.10.20.0betabeta2010-10-25BSD License
Automatically built QA release
Bug #17848 XML_Serializer uses deprecated return new as reference - zigo
0.20.20.20.0betabeta2010-10-26BSD License
Bug #17994 Installed into wrong path
XML_Serializer-0.20.2/doc/todo.txt 0000600 0001750 0001750 00000001060 11461374326 017457 0 ustar clockwerx clockwerx TODO:
-----
- introduce constants for options to avoid typos
TODO XML_Serializer:
--------------------
- find a way to detect references in the structure and add id/idref attributes
- serialize some other structures, especially XPath return values
- custom serialization of objects
TODO XML_Unserializer:
----------------------
- support for xml:space attribute
- set types for certain tags (like in patConfiguration)
- namespace support
- custom unserialization for objects (static unserialize() or fromXML() methods)
- unserialize references using id/idref XML_Serializer-0.20.2/examples/example.xml 0000600 0001750 0001750 00000000122 11461374326 021175 0 ustar clockwerx clockwerx
Test
test