note 15211 added to function.domxml-dumpmem
| From: | daniel at omnis dot com | Date: | Fri, 31 Aug 2001 20:35:37 +0000 |
| Subject: | note 15211 added to function.domxml-dumpmem | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17458@lists.php.net to get a copy of this message | ||
In the PHP 4.0.6 source tree, in ext/domxml/php_domxml.c line 1079, change:
xmlDocDumpMemory(docp, &mem, &size);
to:
xmlKeepBlanksDefault(0);
xmlDocDumpFormatMemory(docp, &mem, &size, 1);
Voilá! Nice pretty formatting! BUT, this will not show empty nodes: <foo />.
Daniel Veillard, libxml2 maintainer, says he may remove this need to set xmlKeepBlanksDefault(0) for
xmlDocDumpFormatMemory() to indent. Without xmlKeepBlanksDefault, it only adds the line breaks, and
doesn't indent.
http://www.php.net/manual/en/function.domxml-dumpmem.php