note 39351 added to function.domnode-child-nodes
| From: | grillen at abendstille dot at | Date: | Sun, 25 Jan 2004 18:08:53 +0000 |
| Subject: | note 39351 added to function.domnode-child-nodes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64168@lists.php.net to get a copy of this message | ||
There were some comments about problems with whitespaces.
you can easily solve them by creating the dom-document as follows:
<?php
$xmlDoc = @domxml_open_mem(
$xmlString
, DOMXML_LOAD_PARSING + //0
DOMXML_LOAD_COMPLETE_ATTRS + //8
DOMXML_LOAD_SUBSTITUTE_ENTITIES + //4
DOMXML_LOAD_DONT_KEEP_BLANKS //16
, $error
);
?>
if you call child_nodes() on eg. the root-element whitespaces are ignored.
----
Manual Page -- http://www.php.net/manual/en/function.domnode-child-nodes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39351
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39351&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39351&report=yes
Search -- http://master.php.net/manage/user-notes.php