(PHP = 4.3) The new child newnode is first unlinked from its existing context, if it already existed in a document.
The following example will add a new element node to a fresh document and sets the attribute "align" to "left".