domxml_open_mem()

From: Date: Wed, 01 Jun 2005 18:04:42 +0000
Subject: domxml_open_mem()
Groups: php.general 
Request: Send a blank email to php-general+get-216165@lists.php.net to get a copy of this message
Consider the following test script: <script language="php"> $doc = domxml_new_doc( '1.0' ); $domNode = $doc->create_element( 'Node' ); $node = $doc->create_element( 'NodeChild' ); $textNode = $doc->create_text_node( 'this' ); $node->append_child( $textNode ); $domNode->append_child( $node ); $doc->append_child( $domNode ); $domNode = $doc->create_element( 'AnotherNode' ); $node = $doc->create_element( 'AnotherNodeChild' ); $textNode = $doc->create_text_node( 'that' ); $node->append_child( $textNode ); $domNode->append_child( $node ); $doc->append_child( $domNode ); $baseDocument = domxml_open_mem( trim( $doc->dump_mem( TRUE ))); // line 20 echo '<pre>' . @$baseDocument->dump_mem( TRUE ) . '</pre>'; </script> When I run it, I am presented with the error: Warning: domxml_open_mem(): Extra content at the end of the document in my_test.php on line 20 Why am I getting that error? I'm using PHP 4.3.8 and I've done some searching in Google and I couldn't find any decent information as to why this might be occuring. Any ideas? thnx, Chris

« previous php.general (#216165) next »