PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Serializer

Swiss-army knife for reading and writing XML files. Creates XML files from data structures and vice versa.

This package is unmaintained.

Download latest release 0.21.0 (there is a newer Composer installable version)

License: BSD License

Description

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.

Documentation

Manual

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#105ClosedBug2003-10-15Objects withot properties are not serialized correctly
#170ClosedBug2003-10-30RDF examples produce incorrect code
#782BogusBug2004-02-17Array with one element becomes scalar
#785BogusBug2004-02-18Some data types being evaluated incorrectly
#903ClosedBug2004-02-26PEAR QA: improvement for get_class()-usage
#1478ClosedBug2004-05-24Array to string conversion at line 496
#1846ClosedBug2004-07-11unserialization bug with empty arrays
#2019ClosedReq2004-07-29defaultTagName and Arrays
#2585BogusBug2004-10-22Notice when error reporting is set to E_ALL
#2650ClosedReq2004-10-29Multiple key attributes
#2688ClosedBug2004-11-04in simplexml mode $array needs to be non-empty
#2720BogusBug2004-11-08Parse error in XML unserialize
#2920ClosedReq2004-12-08Replace Entities
#3034ClosedBug2004-12-27XML_Unserializer does not extend PEAR, but trys to call raiseError()
#3180ClosedReq2005-01-12Serialize/unserialize CDATA elements
#3285ClosedBug2005-01-24"_Serialzer" typo
#3303ClosedBug2005-01-26Cannot tell Unserializer not to use tag names for class
#3444BogusBug2005-02-12undefined method in unserializer
#3448BogusBug2005-02-12Slackware 10.1 - kernel 2.6.7
#3700ClosedBug2005-03-04The data are always trimmed
#3739ClosedBug2005-03-08parseAttributes flag for unserializer not correct default
#3762ClosedReq2005-03-10not serialize null object properties
#3885BogusBug2005-03-19unserializing indexed arrays with one element
#4075ClosedBug2005-04-06tagMap works only on class names (objects)
#4115ClosedReq2005-04-11Serialize Comments
#4325BogusBug2005-05-11Can't serialize an array with multiple identical keys
#4575ClosedBug2005-06-11_serializeObject and __sleep
#4684BogusReq2005-06-260.16.0 breaks option handling
#5086Wont fixReq2005-08-13Class references sometimes missed with unserialize
#5187ClosedBug2005-08-23Unserialize decodeFunction
#6127Wont fixReq2005-12-01Should serialize/unserialize private members
#6128ClosedBug2005-12-01Documentation: wrong parameter type for option
#7112BogusReq0.18.02006-03-13Multiple elements with same name at same level
#7420Wont fixBug0.18.02006-04-19importing lot of xml-date, memory leak
#7522ClosedReq0.18.02006-04-28Typo in package description
#7913BogusReq0.18.02006-06-15'fault' in interpreting XML in xml unserializer makes it almost unuseable.
#8048ClosedBug0.18.02006-06-28Entities are not replaced in tags with attributes
#8534Wont fixReq0.18.02006-08-22empty string treated like null ?
#8650ClosedDoc2006-09-07Missing Information in the Manual
#9633BogusBug2006-12-15Array indexes are not leveled.
#9799BogusBug0.18.02007-01-10attributesArray is poorly named
#10534BogusBug0.18.02007-03-28Seems as if encoding is not the same
#11404Wont fixReq0.18.02007-06-22gettype on typeHints=true may lead to inconsistence in future PHP versions
#11630BogusBugCVS2007-07-17Some entities not replaced correctly
#12003Wont fixBug0.18.02007-09-07XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES buggy on NULL values
#12139BogusBugCVS2007-09-28XML_Parser read '#' in data as Invalid document end
#12393BogusBug2007-11-06functions die() or exit() crash after call get_elements_by_tagname
#12725ClosedDoc2007-12-18tuto link no more available
#13564ClosedReq0.18.02008-04-02bool(false) is converted to empty string
#13613BogusBug0.18.02008-04-07Problem in serialize (stak over flow?)
#13614BogusBug0.18.02008-04-07Problem in serialize (stak over flow?)
#13856ClosedReq0.18.02008-05-08License Change from PHP to BSD
#13896ClosedDoc2008-05-14Bad info in the RSS feed tutorial
#14112AnalyzedReq0.18.02008-06-09#default is ignored for scalarAsAttributes
#14356BogusBug0.18.02008-07-16Unserializer class triies to overide an existing class instantiater
#14653ClosedBug0.19.02008-09-16testNumberedObjects testcase fails
#15602ClosedBug0.19.12009-01-10attributes don't get escaped sometimes
#15670OpenReqCVS2009-01-18Line Numbers
#16014BogusBug0.19.22009-03-10Unserializer drops character entities.
#16072ClosedBug0.19.22009-04-06PHP 4 regression
#16153OpenBug0.19.22009-04-27XML Entities are removed entirely
#16154DuplicateBug0.19.22009-04-27Chars disapper when unserialize
#16204OpenBug0.19.22009-05-08Inconsistent data when FORCE_ENUM is on
#16402OpenReq0.20.02009-07-03Add 'standalone' attribute in <?xml>
#16556Wont fixBug0.20.02009-08-30Deprecated errors thrown by PHP
#16586FeedbackBug0.20.02009-09-09namespace duplication
#16588OpenReq0.20.02009-09-10XSD schema support
#16618OpenBug0.20.02009-09-16Fench chars are scrambled after Unserialize
#16979OpenReq0.20.02010-01-08Add option to make a field use CDATA
#17281OpenDoc0.20.02010-03-30No idea in the docs of what the option 'addDecl' does
#17577OpenBug0.20.02010-07-10Array index being used as tag name rather than object name
#17636OpenBugUnknown2010-07-28Can't parse accentuated tagnames
#17848ClosedBug0.20.02010-09-06XML_Serializer uses deprecated return new as reference
#17994ClosedBug0.20.12010-10-25Installed into wrong path
#17996ClosedBug0.20.12010-10-25Calls to deprecated functions in PHP 5.3
#17999ClosedBug0.20.22010-10-26todo.txt is not a data file
#18359OpenBug0.20.22011-03-11Memory leak in between XML_UnSerializer & XML_Parser
#18395OpenDocSVN2011-03-24problem adding items with same name
#18652OpenReq0.20.22011-07-05Option to change case of TAG
#18675ClosedBug0.20.22011-07-20Strict Standards Errors with XML_Util in php 5.3.6
#19168ClosedBugSVN2011-12-29upgrade PHPUnit require statements & other fixes (for PEAR QA Team)
#19431ClosedBug0.20.22012-05-22Unit tests are failing, please patch
#21052OpenBug0.20.22016-04-12Incompatible Attributes Options
#21173OpenReqSVN2017-01-30XML unserializing with namespaced class names using tagmap