Yep, that did not work for me either. So i declared a new class XxDomDocument and encapsulated the DomImplementation and DomDocument in the constructor. (U can add params to the constructor if u want and pass to the DomImplementation u are creating). The resulting object, this->doc, i then 'decorate' with the php5 magic functions _set, _get and _call. The resulting XxDomDocument for all intends and purposes is the same as a DomDucement created by the DomImplementation. Now u can add in or extend the XxDomDocument class with whatever methods u desire. is looks a bit like so: [code] class XxDomDocument { protected $doc; public function __construct () { $DOM = new DOMImplementation(); $dtd = $DOM->createDocumentType ("html" , "-//W3C//DTD XHTML 1.0 Strict//EN" , "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); $this->doc = $DOM->createDocument ( null, null, $dtd); $this->doc->formatOutput = true; $this->doc->preserveWhiteSpace = false; } public function __set( $name, $value ) { if( property_exists( $this->doc, $name ) ) $this->doc->$name = $value; } public function __get( $name ) { if( property_exists( $this->doc, $name ) ) return $this->doc->$name; } public function __call( $name, $params ) { if( method_exists( $this->doc, $name ) ) return call_user_func_array( array( $this->doc, $name ), $params ); } // end } [/code] I can validate and use getElementById. I can add for example a method to print a page without the xml declaration which would throw WINIE6 into quirksmode... J