Jump to content

Archived

This topic is now archived and is closed to further replies.

spongebobusa

DomElement set_content

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
$domNode->nodeValue = 'some content';

[url=http://nl3.php.net/manual/en/ref.dom.php]Read up.[/url]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.