note 42440 added to function.domxml-open-file

From: Date: Mon, 17 May 2004 02:11:59 +0000
Subject: note 42440 added to function.domxml-open-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-69681@lists.php.net to get a copy of this message
There are apparently several options you can pass (bitwise ANDed) as the second argument (a subset of the libxml2 parser options); below is a list of defined constants from php_domxml.c: #define DOMXML_LOAD_PARSING 0 #define DOMXML_LOAD_VALIDATING 1 #define DOMXML_LOAD_RECOVERING 2 #define DOMXML_LOAD_SUBSTITUTE_ENTITIES 4 #define DOMXML_LOAD_COMPLETE_ATTRS 8 #define DOMXML_LOAD_DONT_KEEP_BLANKS 16 In addition to the use of DOMXML_LOAD_VALIDATING mentioned earlier, you might find DOMXML_COMPLETE_ATTRS useful in simplifying your code; if an attribute in your document is missing an attribute (from the DTD), the parser will set it to the DTD default. With a well-defined DTD, this means you won't have to check for empty attributes or set default ones in your code. ---- Manual Page -- http://www.php.net/manual/en/function.domxml-open-file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42440 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42440&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42440&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69681) next »