From: Uwe Steinmann Date: Tue, 30 Apr 2002 05:18:12 +0000 (+0000) Subject: - added function domxml_parser_set_keep_blanks() X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~345 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3858221c2ff90cecd96b7e379b2157bbf1b9ede4;p=php - added function domxml_parser_set_keep_blanks() --- diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index bb21c59a02..87c9046a49 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -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 */ diff --git a/ext/domxml/php_domxml.h b/ext/domxml/php_domxml.h index dda0c81e59..9e0fc170f2 100644 --- a/ext/domxml/php_domxml.h +++ b/ext/domxml/php_domxml.h @@ -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)