Reply to domxml_open_mem()

Your name:

Reply:


Posted by "Chris Boget" on 06/01/05 21:04

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация