PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<DOMElement->setAttributeNS()DOMImplementation->__construct()>
Last updated: Mon, 16 Jul 2012

DOMAttr->__construct()

(no version information, might be only in CVS)

DOMAttr->__construct() --  Creates a new DOMEntityReference object

说明

class DOMEntityReference {

__construct ( string name )

}

Creates a new DOMEntityReference object.

参数

name

The name of the entity reference.

例子 1. Creating a new DOMEntityReference

<?php

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

?>




<DOMElement->setAttributeNS()DOMImplementation->__construct()>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST