spongebobusa Posted August 24, 2006 Share Posted August 24, 2006 I am not sure why I am getting this error. DOMElement is a sublcass of DomNode.Fatal error: Call to undefined method DOMElement::set_content()Here is my code snippet.[code]$var = new DomElement("name");$var->set_content("some_content");[/code]Thanks in advance. I am using PHP 5.1.2 and PHP 5.1.4 Quote Link to comment Share on other sites More sharing options...
448191 Posted August 24, 2006 Share Posted August 24, 2006 Maybe you're trying to use a DOM XML method on a DOM object? ;D php5 no longer has the depreciated DOM XML library.[quote=manual]Note: This extension is no longer marked experimental. It will, however, never be released with PHP 5, and will only be distributed with PHP 4. If you need DOM XML support with PHP 5 you can use the DOM extension. This domxml extension is not compatible with the DOM extension.[/quote] Quote Link to comment Share on other sites More sharing options...
spongebobusa Posted August 24, 2006 Author Share Posted August 24, 2006 I don't understand. what should I be using instead? Quote Link to comment Share on other sites More sharing options...
448191 Posted August 24, 2006 Share Posted August 24, 2006 $domNode->nodeValue = 'some content';[url=http://nl3.php.net/manual/en/ref.dom.php]Read up.[/url] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.