note 46782 deleted from function.dom-domdocument-loadxml by didou

From: Date: Fri, 17 Dec 2004 17:45:23 +0000
Subject: note 46782 deleted from function.dom-domdocument-loadxml by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81930@lists.php.net to get a copy of this message
Note Submitter: gem at rellim dot com ---- Here are the five options you can set before a load() or loadXML() to affect the way a document loads. validateOnParse - will load and validate against DTD default FALSE resolveExternals - will load the DTD without performaing validation default FALSE preserveWhiteSpace - do not remove redundant white space default TRUE substituteEntities - convert named character entities to numeric entities default FALSE strictErrorChecking - throw exceptions on Errors default TRUE If you do not specify validateOnParse=TRUE or resolveExternals=TRUE then most named entities will be lost on load. If this happens a Warning will be logged. A few entities like & will work either way. If you specify one of those TRUE, and leave substituteEntities=FALSE then the named entities will be passed though unchanged. If instead you set substituteEntities=TRUE then the named entities will be converted to numeric entities. I have local XML catalogs set up, but validateOnParse and resolveExternals create a huge performance penalty for me. Five, ten or twenty times performance loss. There should be a way to tell load() to accept named entities verbatim without the penalty of loading the DTD. strictErrorChecking does not seem to change how PHP 5 handles a load. Errors wil always abort the load(). This only turns throwing exceptions on and off.

« previous php.notes (#81930) next »