Project

General

Profile

Actions

Feature #20750

closed

Enhance t3lib_div::xml2array to handle multible tags with the same name and no index attribute

Added by Nikolas Hagelstein over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-07-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

Currently xml2array isnt capble of handling xml structures like this:

<root>
<item>..</item>
<item>..</item>
</root>

it would be nice if xml2array would return something like:
[item] => Array
(
[0] => Array ....
[1] => Array ....
....
)

A working implementation can be found at:
http://www.bin-co.com/php/scripts/xml2array/

(issue imported from #M11523)


Files

Actions #1

Updated by Steffen Müller over 15 years ago

I have once written a service extension, which implements the mentioned parser of Binny V A. It's not released on TER, but I have added it to this bugreport.
Happy testing

Actions #2

Updated by Nikolas Hagelstein over 15 years ago

Yes got my own arround as well but it would be nice if typo3 would support it by default.

Actions #3

Updated by Peter Klein over 15 years ago

At least write in the header for the t3lib_div::xml2array() function, that it ONLY works with ONE LEVEL of tags. That would save people a lot of time..

Actions #4

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.3

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #5

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF