domxml_open_mem()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux