PHP: DOMNode->normalize() - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DOMNode->removeChild() DOMNode->lookupPrefix()

Last updated: Fri, 26 Jan 2007

view this page in

# DOMNode->normalize()

(no version information, might be only in CVS)

DOMNode->normalize() -- Normalizes the node

## Описание

class DOMNode {
void normalize ( void )
}

Normalizes the node.

## Возвращаемые значения

Эта функция не возвращает значения после выполнения.

## Смотрите также

The DOM Specification
DOMDocument->normalizeDocument()

add a note User Contributed Notes
DOMNode->normalize()
Amir Laher
22-Aug-2005 04:45
`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.`
add a note
DOMNode->removeChild() DOMNode->lookupPrefix()

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST