XML_Util
pear.php.net
XML utility class
Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more.
Chuck Burgess
ashnazg
ashnazg@php.net yes
Stephan Schmidt
schst
schst@php-tools.net no
Davey Shafik
davey
davey@php.net no
2020-04-19
1.4.5
1.4.0
stable
stable
BSD License
* PR #12: fix Trying to access array offset on value of type int
5.4.0
1.9.0
pcre
0.1
0.1
stable
stable
2003-08-01
PHP License
inital release
0.1.1
0.1.1
stable
stable
2003-08-02
PHP License
bugfix: removed bug in createTagFromArray
0.2
0.2
stable
stable
2003-08-12
PHP License
added XML_Util::getDocTypeDeclaration()
0.2.1
0.2.1
stable
stable
2003-09-05
PHP License
fixed bug with zero as tag content in createTagFromArray and createTag
0.3
0.3
stable
stable
2003-09-12
PHP License
added createStartElement() and createEndElement()
0.4
0.4
stable
stable
2003-09-21
PHP License
added createCDataSection(), added support for CData sections in createTag* methods, fixed bug #23, fixed bug in splitQualifiedName()
0.5
0.5
stable
stable
2003-09-23
PHP License
added support for multiline attributes in attributesToString(), createTag*() and createStartElement (requested by Yavor Shahpasov for XML_Serializer), added createComment
0.5.1
0.5.1
stable
stable
2003-09-26
PHP License
added default namespace parameter (optional) in splitQualifiedName() (requested by Sebastian Bergmann)
0.5.2
0.5.2
stable
stable
2003-11-22
PHP License
now creates XHTML compliant empty tags (Davey), minor whitespace fixes (Davey)
0.6.0beta1
0.6.0beta1
beta
beta
2004-05-24
PHP License
- Fixed bug 1438 (namespaces not accepted for isValidName()) (thanks to davey) - added optional parameter to replaceEntities() to define the set of entities to replace - added optional parameter to attributesToString() to define, whether entities should be replaced (requested by Sebastian Bergmann) - allowed second parameter to XML_Util::attributesToString() to be an array containing options (easier to use, if you only need to set the last parameter) - introduced XML_Util::raiseError() to avoid the necessity of including PEAR.php, will only be included on error
0.6.0
0.6.0
stable
stable
2004-06-07
PHP License
- Fixed bug 1438 (namespaces not accepted for isValidName()) (thanks to davey) - added optional parameter to replaceEntities() to define the set of entities to replace - added optional parameter to attributesToString() to define, whether entities should be replaced (requested by Sebastian Bergmann) - allowed second parameter to XML_Util::attributesToString() to be an array containing options (easier to use, if you only need to set the last parameter) - introduced XML_Util::raiseError() to avoid the necessity of including PEAR.php, will only be included on error
0.6.1
0.6.1
stable
stable
2004-10-28
PHP License
- Added check for tag name (either as local part or qualified name) in createTagFromArray() (bug #1083)
1.0.0
1.0.0
stable
stable
2004-10-28
PHP License
- Added reverseEntities() (request #2639)
1.1.0
1.1.0
stable
stable
2004-11-19
PHP License
- Added collapseEmptyTags (patch by Sebastian Bergmann and Thomas Duffey)
1.1.1
1.1.1
stable
stable
2004-12-23
PHP License
- fixed bug in replaceEntities() and reverseEntities() in conjunction with XML_UTIL_ENTITIES_HTML - createTag() and createTagFromArray() now accept XML_UTIL_ENTITIES_XML, XML_UTIL_ENTITIES_XML_REQUIRED, XML_UTIL_ENTITIES_HTML, XML_UTIL_ENTITIES_NONE and XML_UTIL_CDATA_SECTION as $replaceEntities parameter
1.1.2
1.1.2
stable
stable
2006-12-01
PHP License
- fixed bug #5419: isValidName() now checks for character classes - implemented request #8196: added optional parameter to influence array sorting to createTag() createTagFromArray() and createStartElement()
1.1.4
1.1.4
stable
stable
2006-12-16
PHP License
- Fixed bug #9561: Not allowing underscores in middle of tags
1.2.0a1
1.2.0
alpha
alpha
2008-05-04
BSD License
Changed license to New BSD License (Req #13826 [ashnazg]) Added a test suite against all API methods [ashnazg] Switch to package.xml v2 [ashnazg] Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|ja.doma]
1.2.0a2
1.2.0
alpha
alpha
2008-05-22
BSD License
Changed license to New BSD License (Req #13826 [ashnazg]) Added a test suite against all API methods [ashnazg] Switch to package.xml v2 [ashnazg] Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry] Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg] Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry] -- (this fix differs from the one in v1.2.0a1)
1.2.0RC1
1.2.0
beta
beta
2008-07-12
BSD License
Changed license to New BSD License (Req #13826 [ashnazg]) Added a test suite against all API methods [ashnazg] Switch to package.xml v2 [ashnazg] Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry] Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg] Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry] -- (this fix differs from the one in v1.2.0a1)
1.2.0
1.2.0
stable
stable
2008-07-26
BSD License
Changed license to New BSD License (Req #13826 [ashnazg]) Added a test suite against all API methods [ashnazg] Switch to package.xml v2 [ashnazg] Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry] Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg] Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry] -- (this fix differs from the one in v1.2.0a1)
1.2.1
1.2.0
stable
stable
2011-12-31
BSD License
Fixed Bug #14760: Bug in getDocTypeDeclaration() [ashnazg|fpospisil]
1.2.2
1.2.0
stable
stable
2014-06-07
BSD License
QA release

Bug #18343 Entities in file names decoded during packaging Bug #19174 upgrade PHPUnit require statements & other fixes (for PEAR QA Team) Request #19750 examples/example.php encoding
1.2.3
1.2.0
stable
stable
2014-06-07
BSD License
Bug #20293 Broken installation for 1.2.2
1.3.0
1.3.0
stable
stable
2015-02-27
BSD License
* Set minimum PHP version to 5.3.0 * Mark static methods with static keyword
1.4.0
1.4.0
stable
stable
2017-02-03
BSD License
* Set minimum PHP version to 5.4.0 * Set minimum PEAR version to 1.10.1

* Adds a new XML_UTIL_COLLAPSE_NONE option for preventing empty tag collapsing.

* Request #15467 CDATA sections and blank nodes
1.4.1
1.4.0
stable
stable
2017-02-07
BSD License
* Bug #21177 XML_Util::collapseEmptyTags() can return NULL
1.4.2
1.4.0
stable
stable
2017-02-22
BSD License
* Bug #21184 Collapse issue
1.4.3
1.4.0
stable
stable
2017-06-28
BSD License
* Decrease minimum PEAR version to 1.9.0 to allow PEAR upgrades
1.4.4
1.4.0
stable
stable
2019-12-05
BSD License
* PR #11: fix phplint warning
1.4.5
1.4.0
stable
stable
2020-04-19
BSD License
* PR #12: fix Trying to access array offset on value of type int