[TYPO3-core] RFC: Bug #9217: typo3ajax::renderAsXML does not always render XML
Francois Suter
fsuter at cobweb.ch
Sat Aug 23 20:55:00 CEST 2008
Hi Steffen,
> you're right, open is for URI and XML for string.
> Important is the setParserProperty, so here is the working example:
I've finally got the following code working:
$xml = '<test><foo>dummy</bar></test>';
$reader = new XMLReader();
$reader->XML($xml);
$reader->setParserProperty(XMLReader::VALIDATE, true);
if ($reader->isValid()) {
echo 'OK';
}
else {
echo 'KO';
}
but I'm pretty puzzled, because it returns OK, although the XML is
obviously not valid. simplexml_load_string() returns false in such a case...
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-team-core
mailing list