[TYPO3-core] RFC: Bug #9217: typo3ajax::renderAsXML does not always render XML

Martin Kutschker masi-no at spam-typo3.org
Mon Aug 25 12:49:46 CEST 2008


Steffen Kamper schrieb:
> Dmitry Dulepov [typo3] schrieb:
>> Hi!
>>
>> Francois Suter wrote:
>>> Problem:
>>> The typo3ajax class is designed to handle response data for AJAX
>>> calls and return it in a variety of formats. However the
>>> renderAsXML() method does not check if it has valid XML to return.
>>>
>>> Solution:
>>> Check the response content for XML validity. If it's not valid XML,
>>> it means it's an array and t3lib_div::array2xml is called as a
>>> substitute to produce a valid XML response.
>>
>> Does SimpleXML come with PHP by default on Debian and SuSE?
>> What is performance impact of this call?
>>
> Hi Dmitry,
> 
> SimpleXML comes with php5 and is configured with all distributions by
> default, at least all varsions since 5.2. Performance should be no
> problem as parsing of these xml is very fast.

But I fail to see the point of this. Shouldn't be the code around this
call be responsible for ensuring that the XML is proper?

It looks to me that this is only needed for debugging. So maybe you can
turn on "validation" by a switch.

Masi


More information about the TYPO3-team-core mailing list