Public Member Functions

php4DOMElement Class Reference

php4DomElement More...

Inheritance diagram for php4DOMElement:
Collaboration diagram for php4DOMElement:

Public Member Functions

 get_attribute ($name)
 owner_document ()
 get_elements_by_tagname ($name)
 has_attribute ($name)
 remove_attribute ($name)
 set_attribute ($name, $value)
 tagname ()
 set_content ($text)
 get_content ()
 unlink ($aDomNode)
 get_attribute ($name)
 get_elements_by_tagname ($name)
 has_attribute ($name)
 remove_attribute ($name)
 set_attribute ($name, $value)
 tagname ()
 get_attribute ($name)
 get_elements_by_tagname ($name)
 has_attribute ($name)
 remove_attribute ($name)
 set_attribute ($name, $value)
 tagname ()
 set_content ($text)
 get_content ()
 unlink ($aDomNode)

Detailed Description

php4DomElement

Definition at line 246 of file inc.xml5compliance.php.


Member Function Documentation

php4DOMElement::get_attribute ( name  ) 

Definition at line 248 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->getAttribute($name);
        }

php4DOMElement::get_attribute ( name  ) 

Definition at line 199 of file domxml-php4-php5.php.

        {
echo "-N";
                return $this->myDOMNode->getAttribute($name);
        }

php4DOMElement::get_attribute ( name  ) 

Definition at line 204 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->getAttribute($name);
        }

php4DOMElement::get_content (  ) 

Reimplemented from php4DOMNode.

Definition at line 315 of file inc.xml5compliance.php.

        {
                $text_node =& $this->myDOMNode->firstChild;

                if (is_object($text_node))
                {
                        return $text_node->textContent;
                }
                else
                {
                        return "";
                }
        }

php4DOMElement::get_content (  ) 

Reimplemented from php4DOMNode.

Definition at line 266 of file inc.xml5compliance.php.

        {
                $text_node =& $this->myDOMNode->firstChild;

                if (is_object($text_node))
                {
                        return $text_node->textContent;
                }
                else
                {
                        return "";
                }
        }

php4DOMElement::get_elements_by_tagname ( name  ) 

Definition at line 209 of file inc.xml5compliance.php.

        {
                $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
                $nodeSet=array();
                $i=0;
                while ($node=$myDOMNodeList->item($i))
                {
                        $nodeSet[]=new php4DOMElement($node);
                        $i++;
                }

                return $nodeSet;
        }

php4DOMElement::get_elements_by_tagname ( name  ) 

Definition at line 258 of file inc.xml5compliance.php.

        {
                $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
                $nodeSet=array();
                $i=0;
                while ($node=$myDOMNodeList->item($i))
                {
                        $nodeSet[]=new php4DOMElement($node);
                        $i++;
                }

                return $nodeSet;
        }

php4DOMElement::get_elements_by_tagname ( name  ) 

Definition at line 205 of file domxml-php4-php5.php.

        {
echo "-O";
                $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
                $nodeSet=array();
                $i=0;
                if (isset($myDOMNodeList))
                while ($node=$myDOMNodeList->item($i))
                {
                        $nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
                        $i++;
                }
                return $nodeSet;
        }

php4DOMElement::has_attribute ( name  ) 

Definition at line 272 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->hasAttribute($name);
        }

php4DOMElement::has_attribute ( name  ) 

Definition at line 223 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->hasAttribute($name);
        }

php4DOMElement::has_attribute ( name  ) 

Definition at line 220 of file domxml-php4-php5.php.

         {
echo "-P";
                return $this->myDOMNode->hasAttribute($name);
         }

php4DOMElement::owner_document (  ) 

Reimplemented from php4DOMNode.

Definition at line 253 of file inc.xml5compliance.php.

        {
                return new php4DOMDocument($this->myDOMNode->ownerDocument);
        }

php4DOMElement::remove_attribute ( name  ) 

Definition at line 228 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->removeAttribute($name);
        }

php4DOMElement::remove_attribute ( name  ) 

Definition at line 277 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->removeAttribute($name);
        }

php4DOMElement::remove_attribute ( name  ) 

Definition at line 226 of file domxml-php4-php5.php.

         {
echo "-Q";
                return $this->myDOMNode->removeAttribute($name);
         }

php4DOMElement::set_attribute ( name,
value 
)

Definition at line 233 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->setAttribute($name,$value);
        }

php4DOMElement::set_attribute ( name,
value 
)

Definition at line 282 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->setAttribute($name,$value);
        }

php4DOMElement::set_attribute ( name,
value 
)

Definition at line 232 of file domxml-php4-php5.php.

         {
echo "-R";
                return $this->myDOMNode->setAttribute($name,$value);
         }

php4DOMElement::set_content ( text  ) 

Reimplemented from php4DOMNode.

Definition at line 244 of file inc.xml5compliance.php.

        {
                // the following replace has been added to conform with PHP4.
                // A set_content("&") brought a get_content() = "&" there,
                // whereas PHP5 gives a get_content() = "&"
                $text = str_replace("&lt;", "<", $text);
                $text = str_replace("&gt;", ">", $text);
                $text = str_replace("&amp;", "&", $text);
                
                $text_node =& new DOMText();
                $text_node->appendData($text);
                if (is_object($this->myDOMNode->firstChild))
                {
                        $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
                }
                else
                {
                        $this->myDOMNode->appendChild($text_node);
                }
        }

php4DOMElement::set_content ( text  ) 

Reimplemented from php4DOMNode.

Definition at line 293 of file inc.xml5compliance.php.

        {
                // the following replace has been added to conform with PHP4.
                // A set_content("&amp;") brought a get_content() = "&" there,
                // whereas PHP5 gives a get_content() = "&amp;"
                $text = str_replace("&lt;", "<", $text);
                $text = str_replace("&gt;", ">", $text);
                $text = str_replace("&amp;", "&", $text);
                
                $text_node =& new DOMText();
                $text_node->appendData($text);
                if (is_object($this->myDOMNode->firstChild))
                {
                        $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
                }
                else
                {
                        $this->myDOMNode->appendChild($text_node);
                }
        }

php4DOMElement::tagname (  ) 

Definition at line 238 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->tagName;
        }

php4DOMElement::tagname (  ) 

Definition at line 238 of file domxml-php4-php5.php.

         {
echo "-S";
                return $this->myDOMNode->tagName;
         }

php4DOMElement::tagname (  ) 

Definition at line 287 of file inc.xml5compliance.php.

        {
                return $this->myDOMNode->tagName;
        }

php4DOMElement::unlink ( aDomNode  ) 

Definition at line 330 of file inc.xml5compliance.php.

References php4DOMNode::unlink_node().

        {
                parent::unlink_node($aDomNode);
        }

Here is the call graph for this function:

php4DOMElement::unlink ( aDomNode  ) 

Definition at line 281 of file inc.xml5compliance.php.

References php4DOMNode::unlink_node().

        {
                parent::unlink_node($aDomNode);
        }

Here is the call graph for this function:


The documentation for this class was generated from the following files: