note 79973 modified in function.xmlreader-isvalid by danbrown

From: Date: Fri, 28 Nov 2008 21:40:41 +0000
Subject: note 79973 modified in function.xmlreader-isvalid by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147255@lists.php.net to get a copy of this message
isValid() always returns false unless you enable checking for validity by: $reader->setParserProperty(XMLReader::VALIDATE, true); where $reader is XMLReader object. Beware, once you enable this check, PHP will search for DTD file and possibly produce warnings. If you just need to check if XML file is well formed, successful loading into XMLReader object is usually enough. --was-- isValid() always returns false unless you enable checking for validity by: $reader->setParserProperty(XMLReader::VALIDATE, true); where $reader is XMLReader object. Beware, once you enable this check, PHP will search for DTD file and possibly produce warnings. If you just need to check if XML file is well formed, successful loading into XMLReader object is usually enough. http://php.net/manual/en/function.xmlreader-isvalid.php

« previous php.notes (#147255) next »