FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » DOMDocument::saveHTML() Method Not Accepting Single Argument
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
DOMDocument::saveHTML() Method Not Accepting Single Argument [message #178948] Mon, 27 August 2012 04:25 Go to previous message
SMH is currently offline  SMH
Messages: 3
Registered: July 2012
Karma:
Junior Member
Using PHP 5.2

The DOMDocument object method saveHTML() explains that I can pass a DOMNode
object as an optional parameter and get the string output of just the node.

http://www.php.net/manual/en/domdocument.savehtml.php

I have verified that the object I am passing to the method is a DOMElement
object, a type of DOMNode.

I keep getting the warning:

Warning: DOMDocument::saveHTML() expects exactly 0 parameters,
1 given in <php script document>



Is this a bug?

Commentary below does not even address the use of the method with the
optional argument.


====

What do I want to do??

I have DOM elements with mostly one child node of type DOMText representing
file names, and I use 'textContent' property to get the string representing
the file name.

However, some filenames contained characters, like '&', and I had to use
method DOMDocument:createEntityReference() to append them as child nodes to
the element.

But when I try to retrieve with 'textContent' property, only child nodes of
type DOMText are returned concatenated, not entity references.

I figured saveHTML([DOMElement]) might fix this.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Does this indicate a bug in PHP?
Next Topic: How can i know the propery of a javascript object how can i see what object inclue
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 08:40:28 GMT 2024

Total time taken to generate the page: 0.04165 seconds