[TYPO3-core] RFC: Bug #9217: typo3ajax::renderAsXML does not always render XML
Steffen Kamper
info at sk-typo3.de
Sat Aug 23 14:45:29 CEST 2008
Francois Suter schrieb:
> Hi,
>
>> May be check with XMLReader->isValid is a better alternative
>
> Interesting, I didn't know that class. However I can't see how I can
> read a XML string with it. It seems like it's designed to get its XML
> from a URI only. Have I missed something?
>
> Cheers
>
seems so :-)
XMLReader is more powerful and can read/parse files. The big advantage
is the possibility to read streams for very fast parsing of big files.
Have a look here:
http://php.net/en/xmlreader
Example:
$xml = XMLReader::open($this->content);
$xml->setParserProperty(XMLReader::VALIDATE, true);
if ($xml->isValid()) {...}
vg Steffen
More information about the TYPO3-team-core
mailing list