Toms Homepage
  Home    Downloads    Your Account    Forums  
  Create an account
Modules
· Home
· Games
· My Gallery
· PHP Manual
· PHP-Nuke HOWTO
· Web Links
· Your Account
 
Who's Online
Welcome, Anonymous
Nickname

Password

Security Code
Security Code
Type Security Code


(Register)

Membership:
Latest: VelmaCopp
New Today: 252
New Yesterday: 515
Overall: 46103

People Online:
Visitors: 77
Members: 11
Total: 88

Online Now:
COM Milagros9
 VelmaCopp
COM BennieDon
COM VetaRushi
 LetaBrowd
 DarbyCoat
COM VetaHerrm
 SamualYWN
Sweden EvieColla
 DeeSander
 HansChapa
 
DOMNode->appendChild()

DOMNode->appendChild()

DOMNode->appendChild() --  Adds new child at the end of the children

Description

class DOMNode {

DOMNode appendChild ( DOMNode newnode )

}

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.

Parameters

newnode

The appended child.


Return Values

The node added.

Exceptions

DOM_NO_MODIFICATION_ALLOWED_ERR

Raised if this node is readonly or if the previous parent of the node being inserted is readonly.

DOM_HIERARCHY_REQUEST_ERR

Raised if this node is of a type that does not allow children of the type of the newnode node, or if the node to append is one of this node's ancestors or this node itself.

DOM_WRONG_DOCUMENT_ERR

Raised if newnode was created from a different document than the one that created this node.


Examples

The following example will add a new element node to a fresh document.

Example 1. Adding a child

<?php

$doc
= new DOMDocument;

$node = $doc->createElement("para");
$newnode = $doc->appendChild($node);

echo
$doc->saveXML();
?>


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004 by Tom Nitzschner.
Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.100 Seconds

:: VereorLCARS phpbb2 style by Vereor :: PHP-Nuke theme by www.nukemods.com ::