diff --git a/reference/dom/functions/dom-domnode-appendchild.xml b/reference/dom/functions/dom-domnode-appendchild.xml
index 656417757c..a16fd4f8c9 100644
--- a/reference/dom/functions/dom-domnode-appendchild.xml
+++ b/reference/dom/functions/dom-domnode-appendchild.xml
@@ -1,50 +1,86 @@
-
-
-
- DOMNode->appendChild
-
- Adds new child at the end of the children
-
-
-
- &reftitle.description;
-
- DOMNode
-
- DOMNode
- appendChild
- DOMNodenewnode
-
-
-
- This functions appends a child to an existing list of children or creates
- a new list of children. The child can be created with e.g.
- DOMDocument->createElement(),
- DOMDocument->createTextNode()
- etc. or simply by using any other node.
-
-
- Throws DOMException if node cannot be appended.
-
-
- The following example will add a new element node to a fresh document.
-
- Adding a child
-
+
+
+
+ DOMNode->appendChild
+
+ Adds new child at the end of the children
+
+
+
+ &reftitle.description;
+
+ DOMNode
+
+ DOMNode
+ appendChild
+ DOMNodenewnode
+
+
+
+ This functions appends a child to an existing list of children or creates
+ a new list of children. The child can be created with e.g.
+ DOMDocument->createElement(),
+ DOMDocument->createTextNode()
+ etc. or simply by using any other node.
+
+
+ Throws DOMException if the node cannot be appended.
+
+
+
+ &reftitle.parameters;
+
+
+
+ newnode
+
+
+ The appended child.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ The node added.
+
+
+
+ &reftitle.examples;
+
+ The following example will add a new element node to a fresh document.
+
+ Adding a child
+
createElement("para");
$newnode = $doc->appendChild($node);
-print $doc->saveXML();
+
+echo $doc->saveXML();
?>
]]>
-
-
-
-
-
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ DOMNode->removeChild()
+ DOMNode->replaceChild()
+
+
+
+
-
-
- DOMNode->hasAttributes
-
- Checks if node has attributes
-
-
-
- &reftitle.description;
-
- DOMNode
-
- bool
- hasAttributes
-
-
-
-
- This function checks if the node has attributes.
-
-
-
+
+
+
+ DOMNode->hasAttributes
+
+ Checks if node has attributes
+
+
+
+ &reftitle.description;
+
+ DOMNode
+
+ bool
+ hasAttributes
+
+
+
+
+ This function checks if the node has attributes.
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
-
-
- DOMNode->hasChildNodes
-
- Checks if node has children
-
-
-
- &reftitle.description;
-
- DOMNode
-
- bool
- hasChildNodes
-
-
-
-
- This function checks if the node has children.
-
-
-
+
+
+
+ DOMNode->hasChildNodes
+
+ Checks if node has children
+
+
+
+ &reftitle.description;
+
+ DOMNode
+
+ bool
+ hasChildNodes
+
+
+
+
+ This function checks if the node has children.
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
-
-
- DOMNode->removeChild
-
- Removes child from list of children
-
-
-
- &reftitle.description;
-
- DOMNode
-
- DOMNode
- removeChild
- DOMNodeoldchild
-
-
-
- This functions removes a child from a list of children.
- If the child could be removed the functions returns the old child.
-
-
- Throws DOMException if node cannot be removed.
-
-
-
+
+
+
+ DOMNode->removeChild
+
+ Removes child from list of children
+
+
+
+ &reftitle.description;
+
+ DOMNode
+
+ DOMNode
+ removeChild
+ DOMNodeoldnode
+
+
+
+ This functions removes a child from a list of children.
+
+
+ Throws DOMException if the node cannot be removed.
+
+
+
+ &reftitle.parameters;
+
+
+
+ oldnode
+
+
+ The removed child.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ If the child could be removed the functions returns the old child.
+
+
+
+ &reftitle.examples;
+
+ The following example will delete the chapter element of our XML document.
+
+ Removing a child
+
+load('book.xml');
+
+$book = $doc->documentElement;
+
+// we retrieve the chapter and remove it from the book
+$chapter = $book->getElementsByTagName('chapter')->item(0);
+$oldchapter = $book->removeChild($chapter);
+
+echo $doc->saveXML();
+?>]]>
+
+ &example.outputs;
+
+
+
+
+ My lists
+
+
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ DOMNode->appendChild()
+ DOMNode->replaceChild()
+
+
+
+
-
-
- DOMNodelist->item
-
- Retrieves a node specified by index
-
-
-
- &reftitle.description;
-
- DOMNodeList
-
- DOMNode
- item
- intindex
-
-
+
+
+
+ DOMNodelist->item
+
+ Retrieves a node specified by index
+
+
+
+ &reftitle.description;
+
+ DOMNodeList
+
+ DOMNode
+ item
+ intindex
+
+
+
+ Retrieves a node specified by index within the
+ DOMNodeList object.
+
+
+
+ If you need to know the number of nodes in the collection, use
+ the length property of the
+ DOMNodeList object.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ index
+
+
+ Index of the node into the collection.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ The node at the indexth position in the
+ DOMNodeList, or &null; if that is not a valid
+ index.
+
+
+
+ &reftitle.examples;
+
+
+ Traversing all the entries of the table
+
+load('book.xml');
+
+$items = $doc->getElementsByTagName('entry');
+
+for ($i = 0; $i < $items->length; $i++) {
+ echo $items->item($i)->nodeValue . "\n";
+}
+
+?>
+]]>
+
- Retrieves a node specified by index within the
- DOMNodeList object.
+ Alternatively, you can use foreach, which is a much more convenient way:
-
-
+
+nodeValue . "\n";
+}
+
+?>
+]]>
+
+ &example.outputs;
+
+
+
+
+
+
+
+
DOM FunctionsDOM
@@ -289,19 +289,26 @@
doctypeDOMDocumentTypeyes
-
+
+ The Document Type Declaration associated with this document.
+ documentElementDOMElementyes
-
+
+ This is a convenience attribute that allows direct access to the
+ child node that is the document element of the document.
+ documentURIstringno
-
+
+ The location of the document or &null; if undefined.
+ encoding
@@ -319,7 +326,10 @@
implementationDOMImplementationyes
-
+
+ The DOMImplementation object that handles
+ this document.
+ preserveWhiteSpace
@@ -377,19 +387,30 @@
xmlEncodingstringyes
-
+
+ An attribute specifying, as part of the XML declaration, the
+ encoding of this document. This is &null; when unspecified or when it
+ is not known, such as when the Document was created in memory.
+ xmlStandaloneboolno
-
+
+ An attribute specifying, as part of the XML declaration, whether
+ this document is standalone. This is &false; when unspecified.
+ xmlVersionstringno
-
+
+ An attribute specifying, as part of the XML declaration, the
+ version number of this document. If there is no declaration and if
+ this document supports the "XML" feature, the value is "1.0".
+
@@ -402,6 +423,11 @@
Extends DOMNode
+
+ Each DOMDocument has a
+ doctype attribute whose value is either &null; or a
+ DOMDocumentType object.
+
&reftitle.properties;
@@ -420,37 +446,48 @@
publicIdstringyes
-
+ The public identifier of the external subset.systemIdstringyes
-
+ The system identifier of the external subset. This may be an
+ absolute URI or not.namestringyes
-
+ The name of DTD; i.e., the name immediately following the
+ DOCTYPE keyword.entitiesDOMNamedNodeMapyes
-
+
+ A DOMNamedNodeMap containing the general
+ entities, both external and internal, declared in the DTD.
+ notationsDOMNamedNodeMapyes
-
+
+ A DOMNamedNodeMap containing the notations
+ declared in the DTD.
+ internalSubsetstringyes
-
+
+ The internal subset as a string, or null if there is none. This is
+ does not contain the delimiting square brackets.
+
@@ -550,6 +587,10 @@
Extends DOMNode
+
+ This interface represents a known entity, either parsed or unparsed, in
+ an XML document.
+
&reftitle.properties;
@@ -568,37 +609,59 @@
publicIdstringyes
-
+
+ The public identifier associated with the entity if specified, and
+ &null; otherwise.
+ systemIdstringyes
-
+
+ The system identifier associated with the entity if specified, and
+ &null; otherwise. This may be an absolute URI or not.
+ notationNamestringyes
-
+
+ For unparsed entities, the name of the notation for the entity. For
+ parsed entities, this is &null;.
+ actualEncodingstringno
-
+
+ An attribute specifying the encoding used for this entity at the
+ time of parsing, when it is an external parsed entity. This is
+ &null; if it an entity from the internal subset or if it is not
+ known.
+ encodingstringyes
-
+
+ An attribute specifying, as part of the text declaration, the
+ encoding of this entity, when it is an external parsed entity. This
+ is &null; otherwise.
+ versionstring
- no
-
+ yes
+
+ An attribute specifying, as part of the text declaration, the
+ version number of this entity, when it is an external parsed
+ entity. This is &null; otherwise.
+
@@ -706,7 +769,11 @@
lengthintyes
-
+
+ The number of pairs (name and namespaceURI) in the list. The range
+ of valid child node indices is 0 to length - 1
+ inclusive.
+
@@ -782,7 +849,7 @@
nodeValuestringno
-
+ The value of this node, depending on its type.nodeType
@@ -794,79 +861,114 @@
parentNodeDOMNodeyes
-
+ The parent of this node.childNodesDOMNodeListyes
-
+
+ A DOMNodeList that contains all children of
+ this node. If there are no children, this is an empty
+ DOMNodeList.
+ firstChildDOMNodeyes
-
+
+ The first child of this node. If there is no such node, this
+ returns &null;.
+ lastChildDOMNodeyes
-
+
+ The last child of this node. If there is no such node, this returns
+ &null;.
+ previousSiblingDOMNodeyes
-
+
+ The node immediately preceding this node. If there is no such node,
+ this returns &null;.
+ nextSiblingDOMNodeyes
-
+
+ The node immediately following this node. If there is no such node,
+ this returns &null;.
+ attributes
- DomNamedNodeMap
+ DOMNamedNodeMapyes
-
+
+ A DOMNamedNodeMap containing the attributes
+ of this node (if it is a DOMElement) or
+ &null; otherwise.
+ ownerDocumentDOMDocumentyes
-
+
+ The DOMDocument object associated with this
+ node.
+ namespaceURIstringyes
-
+
+ The namespace URI of this node, or &null; if it is unspecified.
+ prefixstringno
-
+
+ The namespace prefix of this node, or &null; if it is unspecified.
+ localNamestringyes
-
+
+ Returns the local part of the qualified name of this node.
+ baseURIstringyes
-
+
+ The absolute base URI of this node or &null; if the implementation
+ wasn't able to obtain an absolute URI.
+ textContentstringno
-
+
+ This attribute returns the text content of this node and its
+ descendants.
+