note 39351 deleted from function.domnode-child-nodes by sobak
| From: | sobak@php.net | Date: | Tue, 22 Nov 2016 03:41:33 +0000 |
| Subject: | note 39351 deleted from function.domnode-child-nodes by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207410@lists.php.net to get a copy of this message | ||
Note Submitter: grillen at abendstille dot at
----
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.