Bug #11067 Updated: dumpmem() does not ident, or even make new lines when called
| From: | bigredlinux at yahoo dot com | Date: | Sat, 08 Jun 2002 14:20:29 +0000 |
| Subject: | Bug #11067 Updated: dumpmem() does not ident, or even make new lines when called | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9850@lists.php.net to get a copy of this message | ||
ID: 11067
Updated by: bigredlinux@yahoo.com
Reported By: paulo@paulo.com.br
Status: Open
Bug Type: Feature/Change Request
Operating System: linux debian 2.2
PHP Version: 4.0.5
New Comment:
It is critical to understand that dump_mem now has a parameter for
formatting the output. However, this feature will only work if when
the xml was created, the whitespace was stripped. This is just how the
underlying libxml2 library works. If you have even a single bit of
indenting in your domxml object, there is no way to get a nice format
on the output. Since when creating new nodes, they are created without
indenting, it is useful to always strip the formatting on the way in.
The problem is, there is NO way to strip formatting on the way in right
now in the php functions domxml_open_*. However, libxml2 does have
this feature and it is just a matter of adding an optional param to
both of these php functions and then adding 3 lines of code in
php_domxml.c.
Previous Comments:
------------------------------------------------------------------------
[2001-05-23 18:19:04] derick@php.net
Changing type to feature request.
Derick
------------------------------------------------------------------------
[2001-05-23 18:16:44] paulo@paulo.com.br
When you are making a new xmldoc using domxml functions like
$node->new_child() and such, then you try to dumpmem, you get an
horrible XML doc. No idents, no breaklines, and you cannot see what is
nested!
I know this is not a bug, but this feature is extremely important.
XML should be readable for an human being. But the document appears in
a single line!
dumpmem does not change original XML (if any). I mean, if you do not
start the XML from the scratch, the original XML reamis idented, and
with breaklines and so, as it should be.
thanks a lot for the good work!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11067&edit=1