note 56058 added to function.dom-domnode-normalize
| From: | AmirLaher at osu1 dot php dot net | Date: | Mon, 22 Aug 2005 11:45:55 +0000 |
| Subject: | note 56058 added to function.dom-domnode-normalize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94023@lists.php.net to get a copy of this message | ||
This is a quote from the DOM level 2 spec, explaining the normalize() function.
----
normalize
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute
nodes, into a "normal" form where only structure (e.g., elements, comments, processing
instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither
adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document
is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer
[XPointer] lookups) that depend on a particular document tree structure are to be used.
----
(source: http://www.w3.org/TR/DOM-Level-2-Core/core.html)
i.e. the idea of normalize is to make text nodes the same as they would be if the xml document was
re-loaded into DOM. It's handy if you want to compare DOM nodes.
----
Manual Page -- http://www.php.net/manual/en/function.dom-domnode-normalize.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56058
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56058&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56058&report=yes
Search -- http://master.php.net/manage/user-notes.php