Feature #59384
closedMake GeneralUtility::xml2tree configurable
100%
Description
Hello there,
I recently ran into a problem with GeneralUtility::xml2tree (formerly known as t3lib_div::xml2tree) where I tried to parse a file that had a tag that was empty. Now because of the strict behavior of xml2tree, the file failed to parse.
Indeed the xml parser is set to not skip white (empty) entries which leeds to an error and then stops parsing.
It would be nice to have the possibility to either modify the behavior of xml2tree globally or to have it to be configurable by parameters. Both could be implemented without risking backwards incompatibility.
Personally I'm a fan of the additional function parameters which I'd implement like this:
... static public function xml2tree($string, $depth = 999, $caseFolding = 0, $skipWhite = 0) { $parser = xml_parser_create(); $vals = array(); $index = array(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, $caseFolding); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $skipWhite); ...
Thank you for you're feedback!
Best Regards
Tizian
Updated by Philipp Gampe over 10 years ago
Would you mind to provide a patch in push that to Gerrit? http://wiki.typo3.org/CWT
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30973
Updated by Markus Hölzle over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 30796a9f683751d74912b20d2aaef212be6ef6da.