ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
php4DOMNode Class Reference

php4DOMNode More...

+ Inheritance diagram for php4DOMNode:
+ Collaboration diagram for php4DOMNode:

Public Member Functions

 php4DOMNode ($aDomNode)
 append_child ($newnode)
 replace_node ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 unlink_node ($aDomNode="")
 clone_node ($deep=false)
 first_child ()
 get_content ()
 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)
 set_content ($text)
 php4DOMNode ($aDomNode, $aOwnerDocument)
 __get ($name)
 append_child ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 clone_node ($deep=false)
 first_child ()
 get_content ()
 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 ()
 owner_document ()
 parent_node ()
 prefix ()
 previous_sibling ()
 remove_child ($oldchild)
 replace_child ($oldnode, $newnode)
 set_content ($text)
 php4DOMNode ($aDomNode)
 append_child ($newnode)
 replace_node ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 unlink_node ($aDomNode="")
 clone_node ($deep=false)
 first_child ()
 get_content ()
 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)
 set_content ($text)

Data Fields

 $myDOMNode
 $myOwnerDocument

Detailed Description

php4DOMNode

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

Member Function Documentation

php4DOMNode::__get (   $name)

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

{
echo "-U";
if ($name=='type') return $this->myDOMNode->nodeType;
elseif ($name=='tagname') return $this->myDOMNode->tagName;
elseif ($name=='content') return $this->myDOMNode->textContent;
else
{
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
php4DOMNode::append_child (   $newnode)

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

References $myOwnerDocument.

{
echo "-V";
return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);
}
php4DOMNode::append_child (   $newnode)

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

{
//echo "BH";
//if (strtolower(get_class($newnode)) != "php4domcdatasection")
//{
$doc =& $this->myDOMNode->ownerDocument;
//echo "<br>BH1:".get_class($newnode).":";
$newnode->myDOMNode =& $doc->importNode($newnode->myDOMNode, true);
//echo "BH2";
return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode));
//}
//else
//{
//}
}
php4DOMNode::append_child (   $newnode)

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

{
//echo "BH";
//if (strtolower(get_class($newnode)) != "php4domcdatasection")
//{
$doc = $this->myDOMNode->ownerDocument;
//echo "<br>BH1:".get_class($newnode).":";
$newnode->myDOMNode = $doc->importNode($newnode->myDOMNode, true);
//echo "BH2";
return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode));
//}
//else
//{
//}
}
php4DOMNode::append_sibling (   $newnode)

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

References $myOwnerDocument.

{
echo "-W";
return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);
}
php4DOMNode::append_sibling (   $newnode)

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

{
return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode));
}
php4DOMNode::append_sibling (   $newnode)

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

{
return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode));
}
php4DOMNode::attributes ( )

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

{
echo "-X";
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
php4DOMNode::attributes ( )

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

{
//echo "<br>node:".$this->myDOMNode->nodeName.":";
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (is_object($myDOMNodeList))
{
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node);
$i++;
}
}
return $nodeSet;
}
php4DOMNode::attributes ( )

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

{
//echo "<br>node:".$this->myDOMNode->nodeName.":";
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (is_object($myDOMNodeList))
{
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node);
$i++;
}
}
return $nodeSet;
}
php4DOMNode::child_nodes ( )

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

{
echo "-Y";
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
php4DOMNode::child_nodes ( )

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

{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node);
$i++;
}
return $nodeSet;
}
php4DOMNode::child_nodes ( )

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

Referenced by children().

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

+ Here is the caller graph for this function:

php4DOMNode::children ( )

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

References child_nodes().

{
echo "-Z";
return $this->child_nodes();
}

+ Here is the call graph for this function:

php4DOMNode::children ( )

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

References child_nodes().

{
//echo "<br>php4DomNode::children"; flush();
return $this->child_nodes();
}

+ Here is the call graph for this function:

php4DOMNode::children ( )

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

References child_nodes().

{
//echo "<br>php4DomNode::children"; flush();
return $this->child_nodes();
}

+ Here is the call graph for this function:

php4DOMNode::clone_node (   $deep = false)

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

References $myOwnerDocument.

{
echo "-a";
return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);
}
php4DOMNode::clone_node (   $deep = false)

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

{
return new php4DOMElement($this->myDOMNode->cloneNode($deep));
}
php4DOMNode::clone_node (   $deep = false)

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

{
return new php4DOMElement($this->myDOMNode->cloneNode($deep));
}
php4DOMNode::first_child ( )

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

{
echo "-b";
return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);
}
php4DOMNode::first_child ( )

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

{
return new php4DOMElement($this->myDOMNode->firstChild);
}
php4DOMNode::first_child ( )

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

{
return new php4DOMElement($this->myDOMNode->firstChild);
}
php4DOMNode::get_content ( )

Reimplemented in php4DOMElement, and php4DOMElement.

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

{
echo "-c";
return $this->myDOMNode->textContent;
}
php4DOMNode::get_content ( )

Reimplemented in php4DOMElement, and php4DOMElement.

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

{
return $this->myDOMNode->textContent;
}
php4DOMNode::get_content ( )

Reimplemented in php4DOMElement, and php4DOMElement.

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

{
return $this->myDOMNode->textContent;
}
php4DOMNode::has_attributes ( )

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

{
echo "-d";
return $this->myDOMNode->hasAttributes();
}
php4DOMNode::has_attributes ( )

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

{
return $this->myDOMNode->hasAttributes();
}
php4DOMNode::has_attributes ( )

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

{
return $this->myDOMNode->hasAttributes();
}
php4DOMNode::has_child_nodes ( )

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

{
echo "-e";
return $this->myDOMNode->hasChildNodes();
}
php4DOMNode::has_child_nodes ( )

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

{
return $this->myDOMNode->hasChildNodes();
}
php4DOMNode::has_child_nodes ( )

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

{
return $this->myDOMNode->hasChildNodes();
}
php4DOMNode::insert_before (   $newnode,
  $refnode 
)

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

References $myOwnerDocument.

{
echo "-f";
return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);
}
php4DOMNode::insert_before (   $newnode,
  $refnode 
)

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

References $myDOMNode.

{
//echo "BH";
$doc =& $this->myDOMNode->ownerDocument;
$newnode->myDOMNode =& $doc->importNode($newnode->myDOMNode, true);
$mydomnode =& $this->myDOMNode;
$mynewnode =& $newnode->myDOMNode;
$myrefnode =& $refnode->myDOMNode;
try
{
$domel =& $mydomnode->insertBefore($mynewnode,$myrefnode);
}
catch (DOMException $exception)
{
// php 4 accepted $this == $refnode -> switch to parent of $this
$mydomnode =& $this->myDOMNode->parentNode;
$domel =& $mydomnode->insertBefore($mynewnode,$myrefnode);
}
$el =& new php4DOMElement($domel);
return $el;
}
php4DOMNode::insert_before (   $newnode,
  $refnode 
)

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

References $myDOMNode.

{
//echo "BH";
$doc = $this->myDOMNode->ownerDocument;
$newnode->myDOMNode = $doc->importNode($newnode->myDOMNode, true);
$mydomnode = $this->myDOMNode;
$mynewnode = $newnode->myDOMNode;
$myrefnode = $refnode->myDOMNode;
try
{
$domel = $mydomnode->insertBefore($mynewnode,$myrefnode);
}
catch (DOMException $exception)
{
// php 4 accepted $this == $refnode -> switch to parent of $this
$mydomnode = $this->myDOMNode->parentNode;
$domel = $mydomnode->insertBefore($mynewnode,$myrefnode);
}
$el = new php4DOMElement($domel);
return $el;
}
php4DOMNode::is_blank_node ( )

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

{
echo "-g";
$myDOMNodeList=$this->myDOMNode->childNodes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
if (($node->nodeType==XML_ELEMENT_NODE)||
(($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))
return false;
$i++;
}
return true;
}
php4DOMNode::last_child ( )

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

{
echo "-h";
return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);
}
php4DOMNode::last_child ( )

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

{
$last =& $this->myDOMNode->lastChild;
if (is_object($last))
{
return new php4DOMElement($last);
}
else
{
return false;
}
}
php4DOMNode::last_child ( )

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

{
$last = $this->myDOMNode->lastChild;
if (is_object($last))
{
return new php4DOMElement($last);
}
else
{
return false;
}
}
php4DOMNode::new_child (   $name,
  $content 
)

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

{
echo "-i";
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}
php4DOMNode::next_sibling ( )

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

{
echo "-j";
return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);
}
php4DOMNode::next_sibling ( )

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

{
$next =& $this->myDOMNode->nextSibling;
if (is_object($next))
{
return new php4DOMElement($next);
}
else
{
return false;
}
}
php4DOMNode::next_sibling ( )

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

{
$next = $this->myDOMNode->nextSibling;
if (is_object($next))
{
return new php4DOMElement($next);
}
else
{
return false;
}
}
php4DOMNode::node_name ( )

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

{
echo "-k";
return $this->myDOMNode->localName;
}
php4DOMNode::node_name ( )

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

{
return $this->myDOMNode->nodeName;
}
php4DOMNode::node_name (   $a_local = false)

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

{
if ($a_local)
{
return $this->myDOMNode->localName;
}
else
{
return $this->myDOMNode->nodeName;
}
}
php4DOMNode::node_type ( )

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

{
echo "-l";
return $this->myDOMNode->nodeType;
}
php4DOMNode::node_type ( )

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

{
return $this->myDOMNode->nodeType;
}
php4DOMNode::node_type ( )

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

{
return $this->myDOMNode->nodeType;
}
php4DOMNode::node_value ( )

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

{
echo "-m";
return $this->myDOMNode->nodeValue;
}
php4DOMNode::node_value ( )

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

{
return $this->myDOMNode->nodeValue;
}
php4DOMNode::node_value ( )

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

{
return $this->myDOMNode->nodeValue;
}
php4DOMNode::owner_document ( )

Reimplemented in php4DOMElement.

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

References $myOwnerDocument.

{
echo "-n";
}
php4DOMNode::parent_node ( )

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

{
echo "-o";
return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);
}
php4DOMNode::parent_node ( )

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

{
$parent =& $this->myDOMNode->parentNode;
if (is_object($parent))
{
return new php4DOMElement($parent);
}
else
{
return false;
}
}
php4DOMNode::parent_node ( )

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

{
$parent = $this->myDOMNode->parentNode;
if (is_object($parent))
{
return new php4DOMElement($parent);
}
else
{
return false;
}
}
php4DOMNode::php4DOMNode (   $aDomNode,
  $aOwnerDocument 
)

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

{
echo "-T";
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
php4DOMNode::php4DOMNode (   $aDomNode)

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

{
$this->myDOMNode=$aDomNode;
}
php4DOMNode::php4DOMNode (   $aDomNode)

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

Referenced by php4DOMDocument\create_cdata_section(), php4DOMDocument\create_comment(), php4DOMDocument\create_text_node(), and php4DOMCDATASection\php4DOMCDATASection().

{
$this->myDOMNode=$aDomNode;
}

+ Here is the caller graph for this function:

php4DOMNode::prefix ( )

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

{
echo "-p";
return $this->myDOMNode->prefix;
}
php4DOMNode::previous_sibling ( )

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

{
echo "-q";
return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);
}
php4DOMNode::previous_sibling ( )

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

{
$prev =& $this->myDOMNode->previousSibling;
if (is_object($prev))
{
return new php4DOMElement($prev);
}
else
{
return false;
}
}
php4DOMNode::previous_sibling ( )

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

{
$prev = $this->myDOMNode->previousSibling;
if (is_object($prev))
{
return new php4DOMElement($prev);
}
else
{
return false;
}
}
php4DOMNode::remove_child (   $oldchild)

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

References $myOwnerDocument.

{
echo "-r";
return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);
}
php4DOMNode::remove_child (   $oldchild)

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

{
return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode));
}
php4DOMNode::remove_child (   $oldchild)

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

{
return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode));
}
php4DOMNode::replace_child (   $oldnode,
  $newnode 
)

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

References $myOwnerDocument.

{
echo "-s";
return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);
}
php4DOMNode::replace_child (   $oldnode,
  $newnode 
)

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

{
return new php4DOMElement($this->myDOMNode->replaceChild($oldchild->myDOMNode,$newnode->myDOMNode));
}
php4DOMNode::replace_child (   $oldnode,
  $newnode 
)

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

{
return new php4DOMElement($this->myDOMNode->replaceChild($oldchild->myDOMNode,$newnode->myDOMNode));
}
php4DOMNode::replace_node (   $newnode)

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

References set_content().

{
return $this->set_content($newnode->myDOMNode->textContent);
}

+ Here is the call graph for this function:

php4DOMNode::replace_node (   $newnode)

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

References set_content().

{
return $this->set_content($newnode->myDOMNode->textContent);
}

+ Here is the call graph for this function:

php4DOMNode::set_content (   $text)

Reimplemented in php4DOMElement, and php4DOMElement.

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

{
echo "-t";
if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))
$this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($text));
}
php4DOMNode::set_content (   $text)

Reimplemented in php4DOMElement, and php4DOMElement.

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

{
$this->myDOMNode->textContent = $text;
return $this->myDOMNode->textContent;
}
php4DOMNode::set_content (   $text)

Reimplemented in php4DOMElement, and php4DOMElement.

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

Referenced by replace_node().

{
$this->myDOMNode->textContent = $text;
return $this->myDOMNode->textContent;
}

+ Here is the caller graph for this function:

php4DOMNode::unlink_node (   $aDomNode = "")

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

{
// sometimes the node to unlink is passed
if (!is_object($aDomNode))
{
$aDomNode =& $this;
}
$parent =& $aDomNode->myDOMNode->parentNode;
if (is_object($parent))
{
$parent->removeChild($aDomNode->myDOMNode);
}
}
php4DOMNode::unlink_node (   $aDomNode = "")

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

Referenced by php4DOMElement\unlink().

{
// sometimes the node to unlink is passed
if (!is_object($aDomNode))
{
$aDomNode = $this;
//$aDomNode = $this;
}
$parent = $aDomNode->myDOMNode->parentNode;
if (is_object($parent))
{
$parent->removeChild($aDomNode->myDOMNode);
}
}

+ Here is the caller graph for this function:

Field Documentation

php4DOMNode::$myDOMNode

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

Referenced by insert_before().

php4DOMNode::$myOwnerDocument

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