]> granicus.if.org Git - php/commitdiff
- added function domxml_parser_set_keep_blanks()
authorUwe Steinmann <steinm@php.net>
Tue, 30 Apr 2002 05:18:12 +0000 (05:18 +0000)
committerUwe Steinmann <steinm@php.net>
Tue, 30 Apr 2002 05:18:12 +0000 (05:18 +0000)
ext/domxml/php_domxml.c
ext/domxml/php_domxml.h

index bb21c59a02b74436a444de17d7178f34c5a48000..87c9046a49ad0358175d0bc8a802cf18f1b359df 100644 (file)
@@ -299,6 +299,7 @@ static function_entry php_domxmldoc_class_functions[] = {
 static function_entry php_domxmlparser_class_functions[] = {
        PHP_FALIAS(add_chunk,                           domxml_parser_add_chunk,                NULL)
        PHP_FALIAS(end,                                         domxml_parser_end,                              NULL)
+       PHP_FALIAS(set_keep_blanks,                     domxml_parser_set_keep_blanks,  NULL)
        {NULL, NULL, NULL}
 };
 
@@ -3655,6 +3656,21 @@ PHP_FUNCTION(domxml_parser_end)
 }
 /* }}} */
 
+/* {{{ proto bool domxml_parser_set_keep_blanks(bool mode)
+   Determines how to handle blanks */
+PHP_FUNCTION(domxml_parser_set_keep_blanks)
+{
+       zval *id;
+       xmlParserCtxtPtr parserp;
+       zend_bool mode;
+
+       DOMXML_PARAM_ONE(parserp, id, le_domxmlparserp, "b", &mode);
+       parserp->keepBlanks = mode;
+
+       RETURN_TRUE;
+}
+/* }}} */
+
 #ifdef newcode
 /* {{{ proto int node_namespace([int node])
    Returns list of namespaces */
index dda0c81e590368c8f6574cfba714de461b55c1c6..9e0fc170f2e1e78973deb153af7fc644c985a286 100644 (file)
@@ -167,6 +167,7 @@ PHP_FUNCTION(domxml_pi_data);
 PHP_FUNCTION(domxml_parser);
 PHP_FUNCTION(domxml_parser_add_chunk);
 PHP_FUNCTION(domxml_parser_end);
+PHP_FUNCTION(domxml_parser_set_keep_blanks);
 
 /* Class XPathContext methods */
 #if defined(LIBXML_XPATH_ENABLED)