Home » XML » XML_Util
XML utility class
This package is unmaintained.
Download latest release 1.4.5 (there might be newer Composer installable version)
License: BSD License
Description
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.
Documentation
Maintainers
- Chuck Burgess (ashnazg) — lead, active
- Stephan Schmidt (schst) — lead, inactive
- Davey Shafik (davey) — helper, inactive
Dependencies
Required
- PHP (>= 5.4.0)
- PEAR Installer (>= 1.9.0)
- pcre (extension)
Releases
- 1.4.5 (stable, 2020-04-19)
Release notes
License: BSD License
* PR #12: fix Trying to access array offset on value of type int
- 1.4.4 (stable, 2019-12-05)
Release notes
License: BSD License
* PR #11: fix phplint warning
- 1.4.3 (stable, 2017-06-28)
Release notes
License: BSD License
* Decrease minimum PEAR version to 1.9.0 to allow PEAR upgrades
- 1.4.2 (stable, 2017-02-22)
Release notes
License: BSD License
* Bug #21184 Collapse issue
- 1.4.1 (stable, 2017-02-07)
Release notes
License: BSD License
* Bug #21177 XML_Util::collapseEmptyTags() can return NULL
- 1.4.0 (stable, 2017-02-03)
Release notes
License: 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.3.0 (stable, 2015-02-27)
Release notes
License: BSD License
* Set minimum PHP version to 5.3.0
* Mark static methods with static keyword - 1.2.3 (stable, 2014-06-07)
Release notes
License: BSD License
Bug #20293 Broken installation for 1.2.2
- 1.2.1 (stable, 2008-12-07)
Release notes
License: BSD License
Fixed Bug #14760: Bug in getDocTypeDeclaration() [ashnazg|fpospisil]
- 1.2.0 (stable, 2008-07-26)
Release notes
License: 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 (beta, 2008-07-12)
Release notes
License: 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.0a2 (alpha, 2008-05-22)
Release notes
License: 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.0a1 (alpha, 2008-05-04)
Release notes
License: 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.1.4 (stable, 2006-12-16)
- 1.1.2 (stable, 2006-12-01)
Release notes
License: 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.1 (stable, 2004-12-23)
Release notes
License: 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.0 (stable, 2004-11-19)
Release notes
License: PHP License
- Added collapseEmptyTags (patch by Sebastian Bergmann and Thomas Duffey)
- 1.0.0 (stable, 2004-10-28)
Release notes
License: PHP License
- Added reverseEntities() (request #2639)
- 0.6.1 (stable, 2004-06-27)
Release notes
License: PHP License
- Added check for tag name (either as local part or qualified name) in createTagFromArray() (bug #1083)
- 0.6.0 (stable, 2004-06-07)
Release notes
License: 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.0beta1 (beta, 2004-05-24)
Release notes
License: 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.5.2 (stable, 2003-11-22)
Release notes
License: PHP License
now creates XHTML compliant empty tags (Davey),
minor whitespace fixes (Davey) - 0.5.1 (stable, 2003-09-26)
Release notes
License: PHP License
added default namespace parameter (optional) in splitQualifiedName() (requested by Sebastian Bergmann)
- 0.5 (stable, 2003-09-23)
Release notes
License: PHP License
added support for multiline attributes in attributesToString(), createTag*() and createStartElement (requested by Yavor Shahpasov for XML_Serializer),
added createComment - 0.4 (stable, 2003-09-21)
Release notes
License: PHP License
added createCDataSection(),
added support for CData sections in createTag* methods,
fixed bug #23,
fixed bug in splitQualifiedName() - 0.3 (stable, 2003-09-12)
Release notes
License: PHP License
added createStartElement() and createEndElement()
- 0.2.1 (stable, 2003-09-05)
Release notes
License: PHP License
fixed bug with zero as tag content in createTagFromArray and createTag
- 0.2 (stable, 2003-08-12)
Release notes
License: PHP License
added XML_Util::getDocTypeDeclaration()
- 0.1.1 (stable, 2003-08-02)
Release notes
License: PHP License
bugfix: removed bug in createTagFromArray
- 0.1 (stable, 2003-08-01)
Release notes
License: PHP License
inital release
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #23 | Closed | Bug | 2003-09-18 | Array To String conversion | |
| #1083 | Closed | Bug | 2004-03-26 | E_ALL notices | |
| #1438 | Closed | Bug | 2004-05-19 | Fixes to XML_Util::isValidName | |
| #2639 | Closed | Req | 2004-10-28 | Missing stripEntities() | |
| #3047 | Closed | Req | 2004-12-28 | Multiple namespaces | |
| #4950 | Closed | Bug | 2005-07-29 | Incorrect CDATA serializing | |
| #5392 | Closed | Bug | 2005-09-13 | encoding of ISO-8859-1 is the only supported encoding | |
| #5419 | Closed | Bug | 2005-09-15 | isValidString() incorrect | |
| #8196 | Closed | Req | 1.1.1 | 2006-07-12 | createTagFromArray sort toggle |
| #9561 | Closed | Bug | 1.1.2 | 2006-12-06 | Not allowing underscores in middle of tags |
| #10535 | Wont fix | Req | 1.1.4 | 2007-03-28 | Line-breaks |
| #13826 | Closed | Req | CVS | 2008-05-02 | License Change from PHP to BSD |
| #13839 | Closed | Req | 1.2.0a1 | 2008-05-05 | Missing XHTML empty tags to collapse |
| #14760 | Closed | Bug | 1.2.0 | 2008-10-08 | Bug in getDocTypeDeclaration() |
| #15467 | Closed | Req | 1.2.1 | 2008-12-30 | CDATA sections and blank nodes |
| #18343 | Closed | Bug | 2011-03-08 | Entities in file names decoded during packaging | |
| #19174 | Closed | Bug | SVN | 2011-12-30 | upgrade PHPUnit require statements & other fixes (for PEAR QA Team) |
| #19750 | Closed | Req | 1.2.1 | 2012-12-15 | examples/example.php encoding |
| #20293 | Closed | Bug | 2014-06-07 | Broken installation for 1.2.2 | |
| #21057 | Closed | Bug | 1.3.0 | 2016-04-28 | Strict Standards |
| #21177 | Closed | Bug | 1.4.0 | 2017-02-06 | XML_Util::collapseEmptyTags() can return NULL |
| #21184 | Closed | Bug | 1.4.1 | 2017-02-22 | Collapse issue |