[TYPO3-core] RFC: Bug #9217: typo3ajax::renderAsXML does not always render XML
Oliver Klee
typo3-german-02 at oliverklee.de
Sat Aug 23 12:14:58 CEST 2008
Hi,
+ // Use SimpleXML utility to check XML validity, and if valid, return
the string
+ if (simplexml_load_string($xmlString)) {
+ echo $xmlString;
+ } else {
+ // String is not valid XML, use t3lib_div::array2xml to convert it
to proper XML
+ echo t3lib_div::array2xml($this->content);
Another idea: Can't we use is_array($this->content) instead for the
check? array2xml fails if it doesn't get a string anyway.
Oliver
More information about the TYPO3-team-core
mailing list