[Typo3-dev] suggestion for t3lib_div::xml2array()

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Sun Mar 28 10:59:23 CEST 2004


Kasper Skårhøj wrote:
> I was talking about <numIndex index="0">, not <item numIndex="0">

My approach was that the *element* could have a meaningful name other 
than the arbitrary "numIndex". The *attribute* "numIndex" was meant more 
as a kind of hint to the conversion function. Basically the same as the 
"index" attribute, which works as expected.
Another option would be and additional attribute "indexType", could be 
set e.g. to string or integer.

Aynway, in the case of flexforms it seems not to make any difference if 
I get a string via "index" or not. The BE renders the form correctly 
even if I don't get a numeric array.

So what I was trying to do was: forcing conversion to an array with 
numeric indices plus providing a shorthand for these arrays. I still 
think the former would be good to have, and the latter is, well, a nice 
goodie.

Masi

PS: It'd be great if eg newloginox would be updated to use the 
index-attribute rather than the nX elements. I was trying to learn by 
example and ended up wasting my time and your time.





More information about the TYPO3-dev mailing list