ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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)
 add_namespace ($uri, $prefix)
 get_attribute ($name)
 get_attribute_node ($name)
 get_elements_by_tagname ($name)
 has_attribute ($name)
 remove_attribute ($name)
 set_attribute ($name, $value)
 set_name ($name)
 tagname ()
 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)
- Public Member Functions inherited from php4DOMNode
 php4DOMNode ($aDomNode)
 append_child ($newnode)
 replace_node ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 unlink_node ($aDomNode="")
 clone_node ($deep=false)
 first_child ()
 has_attributes ()
 has_child_nodes ()
 insert_before ($newnode, $refnode)
 last_child ()
 next_sibling ()
 node_name ($a_local=false)
 node_type ()
 node_value ()
 parent_node ()
 previous_sibling ()
 remove_child ($oldchild)
 replace_child ($oldnode, $newnode)
 php4DOMNode ($aDomNode, $aOwnerDocument)
 __get ($name)
 add_child ($newnode)
 append_child ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 clone_node ($deep=false)
 dump_node ($node=null)
 first_child ()
 has_attributes ()
 has_child_nodes ()
 insert_before ($newnode, $refnode)
 is_blank_node ()
 last_child ()
 new_child ($name, $content)
 next_sibling ()
 node_name ()
 node_type ()
 node_value ()
 parent_node ()
 prefix ()
 previous_sibling ()
 remove_child ($oldchild)
 replace_child ($newnode, $oldnode)
 replace_node ($newnode)
 set_namespace ($uri, $prefix=null)
 unlink_node ()
 php4DOMNode ($aDomNode, $aOwnerDocument)
 __get ($name)
 append_child ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 clone_node ($deep=false)
 first_child ()
 has_attributes ()
 has_child_nodes ()
 insert_before ($newnode, $refnode)
 is_blank_node ()
 last_child ()
 new_child ($name, $content)
 next_sibling ()
 node_name ()
 node_type ()
 node_value ()
 parent_node ()
 prefix ()
 previous_sibling ()
 remove_child ($oldchild)
 replace_child ($oldnode, $newnode)
 php4DOMNode ($aDomNode)
 append_child ($newnode)
 replace_node ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 unlink_node ($aDomNode="")
 clone_node ($deep=false)
 first_child ()
 has_attributes ()
 has_child_nodes ()
 insert_before ($newnode, $refnode)
 last_child ()
 next_sibling ()
 node_name ()
 node_type ()
 node_value ()
 parent_node ()
 previous_sibling ()
 remove_child ($oldchild)
 replace_child ($oldnode, $newnode)

Additional Inherited Members

- Static Public Member Functions inherited from php4DOMNode
static _newDOMElement ($aDOMNode, $aOwnerDocument)
- Data Fields inherited from php4DOMNode
 $myDOMNode
 $myOwnerDocument
- Protected Member Functions inherited from php4DOMNode
 _importNode ($newnode)

Detailed Description

php4DomElement

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

Member Function Documentation

php4DOMElement::add_namespace (   $uri,
  $prefix 
)

Reimplemented from php4DOMNode.

Definition at line 185 of file domxml-php4-to-php5.php.

{
if ($this->myDOMNode->hasAttributeNS('http://www.w3.org/2000/xmlns/',$prefix)) return false;
else
{
$this->myDOMNode->setAttributeNS('http://www.w3.org/2000/xmlns/','xmlns:'.$prefix,$uri); //By Daniel Walker 2006-09-08
return true;
}
}
php4DOMElement::get_attribute (   $name)

Definition at line 194 of file domxml-php4-to-php5.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_attribute (   $name)

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

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

Definition at line 195 of file domxml-php4-to-php5.php.

References php4DOMNode\$myOwnerDocument, and php4DOMNode\_newDOMElement().

{return parent::_newDOMElement($this->myDOMNode->getAttributeNode($name),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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_content ( )

Reimplemented from php4DOMNode.

Definition at line 326 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 196 of file domxml-php4-to-php5.php.

{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
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::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 269 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::has_attribute (   $name)

Definition at line 205 of file domxml-php4-to-php5.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::has_attribute (   $name)

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

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

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

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

Reimplemented from php4DOMNode.

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

{
return new php4DOMDocument($this->myDOMNode->ownerDocument);
}
php4DOMElement::remove_attribute (   $name)

Definition at line 206 of file domxml-php4-to-php5.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::remove_attribute (   $name)

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

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

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

{
return $this->myDOMNode->removeAttribute($name);
}
php4DOMElement::set_attribute (   $name,
  $value 
)

Definition at line 207 of file domxml-php4-to-php5.php.

{
//return $this->myDOMNode->setAttribute($name,$value); //Does not return a DomAttr
$myAttr=$this->myDOMNode->ownerDocument->createAttribute($name);
$myAttr->value=htmlspecialchars($value,ENT_QUOTES); //Entity problem reported by AL-DesignWorks 2007-09-07
$this->myDOMNode->setAttributeNode($myAttr);
return new php4DOMAttr($myAttr,$this->myOwnerDocument);
}
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_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 293 of file inc.xml5compliance.php.

{
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 304 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::set_name (   $name)

Definition at line 221 of file domxml-php4-to-php5.php.

{
if ($this->myDOMNode->prefix=='') $newNode=$this->myDOMNode->ownerDocument->createElement($name);
else $newNode=$this->myDOMNode->ownerDocument->createElementNS($this->myDOMNode->namespaceURI,$this->myDOMNode->prefix.':'.$name);
$myDOMNodeList=$this->myDOMNode->attributes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++))
if ($node->namespaceURI=='') $newNode->setAttribute($node->name,$node->value);
else $newNode->setAttributeNS($node->namespaceURI,$node->nodeName,$node->value);
$myDOMNodeList=$this->myDOMNode->childNodes;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item(0)) $newNode->appendChild($node);
$this->myDOMNode->parentNode->replaceChild($newNode,$this->myDOMNode);
$this->myDOMNode=$newNode;
return true;
}
php4DOMElement::tagname ( )

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

{return $this->tagname;}
php4DOMElement::tagname ( )

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

{
echo "-S";
return $this->myDOMNode->tagName;
}
php4DOMElement::tagname ( )

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

{
return $this->myDOMNode->tagName;
}
php4DOMElement::tagname ( )

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

{
return $this->myDOMNode->tagName;
}
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:

php4DOMElement::unlink (   $aDomNode)

Definition at line 341 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: