cvs: php4 /ext/domxml php_domxml.c

From: Date: Tue, 12 Mar 2002 08:24:51 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9937@lists.php.net to get a copy of this message
chregu Tue Mar 12 03:24:51 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: nicer (optional) formated output in dump_mem and dump_mem_file Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.124 php4/ext/domxml/php_domxml.c:1.125 --- php4/ext/domxml/php_domxml.c:1.124 Mon Mar 11 17:37:32 2002 +++ php4/ext/domxml/php_domxml.c Tue Mar 12 03:24:50 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.124 2002/03/11 22:37:32 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.125 2002/03/12 08:24:50 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -2826,7 +2826,10 @@ DOMXML_PARAM_ONE(docp, id, le_domxmldocp,"|l",&format); if (format) + { + xmlKeepBlanksDefault(0); xmlDocDumpFormatMemory(docp, &mem, &size, format); + } else xmlDocDumpMemory(docp, &mem, &size); @@ -2846,12 +2849,21 @@ zval *id; xmlDoc *docp; int file_len, bytes; + int format = 0; int compressmode = 0; char *file; - DOMXML_PARAM_THREE(docp, id, le_domxmldocp, "s|l", &file, &file_len, &compressmode); + DOMXML_PARAM_FOUR(docp, id, le_domxmldocp, "s|ll", &file, &file_len, &compressmode,&format); xmlSetCompressMode (compressmode); - bytes = xmlSaveFile(file,docp); + + if (format) + { + xmlKeepBlanksDefault(0); + bytes = xmlSaveFormatFile(file,docp,format); + } + else + bytes = xmlSaveFile(file,docp); + if (bytes == -1) { RETURN_FALSE;

« previous php.cvs (#9937) next »