Now: Tutorial for Web and Software Design > PHP > PHP Reference > PHP Content
> PHP: DOMText-__construct() - Manual [Bookmark it]
PHP: DOMText-__construct() - Manual

DOMText->__construct()

(no version information, might be only in CVS)

DOMText->__construct() --  Creates a new DOMText object

Description

class DOMText {

__construct ( [string value] )

}

Creates a new DOMText object.

Parameters

value

The value of the text node. If not supplied an empty text node is created.

Examples

Example 1. Creating a new DOMText

<?php

$dom
= new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$text = $element->appendChild(new DOMText('root value'));
echo
$dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root>root value</root> */

?>



[Bookmark][Print] [Close][To Top]
  • Prev Article-PHP:

  • Next Article-PHP:
  • Related Materias
    Managing Sessions and Stat
    Autofilled PHP Forms
    Implementing MVC in PHP: T
    Implementing MVC in PHP: T
    Simplify PHP Development w
    Testing PHP Code with PHPU
    PHP Code Generation with E
    Implementing MVC in PHP: T
    Understanding MVC in PHP
    Important Notice for PHP D
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial