echo $attr_1->nodeName . "<br>"; echo $attr_2->nodeName . "<br>"; echo $attr_1->nodeValue . "<br/>"; echo $attr_2->nodeValue . "<br/>"; echo "---------------------------------------*<br/>"; $cdata_1 = $document->createCdataSection("Section CDATA 1"); $cdata_2 = new domCdataSection("Section CDATA 2"); echo $cdata_1->nodeValue . "<br/>"; echo $cdata_2->nodeValue . "<br/>"; echo "---------------------------------------*<br/>"; $text_1 = $document->createTextNode("Text Node 1"); $text_2 = new domText("Text Node 2"); echo $text_1->nodeValue . "<br/>"; echo $text_2->nodeValue . "<br/>"; echo "---------------------------------------*<br/>"; $comment_1 = $document->createComment("Comment 1"); $comment_2 = new domComment("Comment 2"); echo $comment_1->nodeValue . "<br/>"; echo $comment_2->nodeValue . "<br/>"; echo "<br/>*---------------------------------------*<br/><br/>"; $comment = $document->createComment("This is document"); $document->appendChild($comment); $root = $document->createElement("root"); $document->appendChild($root); $element1 = $document->createElement("el1"); $element2 = $document->createElement("el2"); $root->appendChild($element1); $root->appendChild($element2); $text1 = $document->createTextNode("Text 1"); $text2 = $document->createTextNode("Text 2"); $element1->appendChild($text1);