ILIAS  Release_4_0_x_branch Revision 61816
 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)
 add_child ($newnode)
 add_namespace ($uri, $prefix)
 append_child ($newnode)
 append_sibling ($newnode)
 attributes ()
 child_nodes ()
 children ()
 clone_node ($deep=false)
 dump_node ($node=null)
 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 ($newnode, $oldnode)
 replace_node ($newnode)
 set_content ($text)
 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 ()
 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)

Static Public Member Functions

static _newDOMElement ($aDOMNode, $aOwnerDocument)

Data Fields

 $myDOMNode
 $myOwnerDocument

Protected Member Functions

 _importNode ($newnode)

Detailed Description

php4DOMNode

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

Member Function Documentation

php4DOMNode::__get (   $name)

Reimplemented in php4DOMText, and php4DOMAttr.

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

References $name.

{
switch ($name)
{
case 'type': return $this->myDOMNode->nodeType;
case 'tagname': return ($this->myDOMNode->nodeType===XML_ELEMENT_NODE) ? $this->myDOMNode->localName : $this->myDOMNode->tagName; //Avoid namespace prefix for DOMElement
case 'content': return $this->myDOMNode->textContent;
case 'value': return $this->myDOMNode->value;
default:
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
php4DOMNode::__get (   $name)

Reimplemented in php4DOMText, and php4DOMAttr.

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

References $name, and elseif().

{
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;
}
}

+ Here is the call graph for this function:

php4DOMNode::_importNode (   $newnode)
protected

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

{return $this->myOwnerDocument===$newnode->myOwnerDocument ? $newnode->myDOMNode : $this->myOwnerDocument->myDOMNode->importNode($newnode->myDOMNode,true);} //To import DOMNode from another DOMDocument
static php4DOMNode::_newDOMElement (   $aDOMNode,
  $aOwnerDocument 
)
static

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

References php4DOMNode().

Referenced by append_child(), append_sibling(), clone_node(), php4DOMDocument\document_element(), first_child(), php4DOMElement\get_attribute_node(), php4DOMDocument\get_element_by_id(), insert_before(), last_child(), next_sibling(), parent_node(), php4DOMNodelist\php4DOMNodelist(), previous_sibling(), remove_child(), replace_child(), replace_node(), and php4DOMDocument\root().

{//Check the PHP5 DOMNode before creating a new associated PHP4 DOMNode wrapper
if ($aDOMNode==null) return null;
switch ($aDOMNode->nodeType)
{
case XML_ELEMENT_NODE: return new php4DOMElement($aDOMNode,$aOwnerDocument);
case XML_TEXT_NODE: return new php4DOMText($aDOMNode,$aOwnerDocument);
case XML_ATTRIBUTE_NODE: return new php4DOMAttr($aDOMNode,$aOwnerDocument);
case XML_PI_NODE: return new php4DomProcessingInstruction($aDOMNode,$aOwnerDocument);
default: return new php4DOMNode($aDOMNode,$aOwnerDocument);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

php4DOMNode::add_child (   $newnode)

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

References append_child().

{return append_child($newnode);}

+ Here is the call graph for this function:

php4DOMNode::add_namespace (   $uri,
  $prefix 
)

Reimplemented in php4DOMElement.

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

{return false;}
php4DOMNode::append_child (   $newnode)

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

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->appendChild($this->_importNode($newnode)),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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.

Referenced by add_child().

{
//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
//{
//}
}

+ Here is the caller graph for this function:

php4DOMNode::append_sibling (   $newnode)

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

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->parentNode->appendChild($this->_importNode($newnode)),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 267 of file domxml-php4-to-php5.php.

{
$myDOMNodeList=$this->myDOMNode->attributes;
if (!(isset($myDOMNodeList)&&$this->myDOMNode->hasAttributes())) return null;
$nodeSet=array();
$i=0;
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
return $nodeSet;
}
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 276 of file domxml-php4-to-php5.php.

{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=self::_newDOMElement($node,$this->myOwnerDocument);
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 285 of file domxml-php4-to-php5.php.

References child_nodes().

{return $this->child_nodes();}

+ Here is the call 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 286 of file domxml-php4-to-php5.php.

References $myOwnerDocument, and _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}

+ 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::dump_node (   $node = null)

Reimplemented in php4DOMDocument, and php4DOMDocument.

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

{return $node==null ? $this->myOwnerDocument->myDOMNode->saveXML($this->myDOMNode) : $this->myOwnerDocument->myDOMNode->saveXML($node->myDOMNode);}
php4DOMNode::first_child ( )

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

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 290 of file domxml-php4-to-php5.php.

{return $this->myDOMNode->textContent;}
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 291 of file domxml-php4-to-php5.php.

{return $this->myDOMNode->hasAttributes();}
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 292 of file domxml-php4-to-php5.php.

{return $this->myDOMNode->hasChildNodes();}
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 293 of file domxml-php4-to-php5.php.

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->insertBefore($this->_importNode($newnode),$refnode==null?null:$refnode->myDOMNode),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 294 of file domxml-php4-to-php5.php.

{return ($this->myDOMNode->nodeType===XML_TEXT_NODE)&&preg_match('%^\s*$%',$this->myDOMNode->nodeValue);}
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 295 of file domxml-php4-to-php5.php.

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 296 of file domxml-php4-to-php5.php.

References $name, and _entityDecode().

{
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode(_entityDecode($content)));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}

+ Here is the call graph for this function:

php4DOMNode::new_child (   $name,
  $content 
)

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

References $name.

{
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 303 of file domxml-php4-to-php5.php.

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 304 of file domxml-php4-to-php5.php.

{return ($this->myDOMNode->nodeType===XML_ELEMENT_NODE) ? $this->myDOMNode->localName : $this->myDOMNode->nodeName;} //Avoid namespace prefix for DOMElement
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 305 of file domxml-php4-to-php5.php.

{return $this->myDOMNode->nodeType;}
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 306 of file domxml-php4-to-php5.php.

{return $this->myDOMNode->nodeValue;}
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 307 of file domxml-php4-to-php5.php.

References $myOwnerDocument.

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 308 of file domxml-php4-to-php5.php.

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 244 of file domxml-php4-to-php5.php.

{
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
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)
php4DOMNode::prefix ( )

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

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

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

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

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

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 311 of file domxml-php4-to-php5.php.

References $myOwnerDocument, and _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 (   $newnode,
  $oldnode 
)

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

References _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->replaceChild($this->_importNode($newnode),$oldnode->myDOMNode),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 313 of file domxml-php4-to-php5.php.

References $myDOMNode, and _newDOMElement().

{return self::_newDOMElement($this->myDOMNode->parentNode->replaceChild($this->_importNode($newnode),$this->myDOMNode),$this->myOwnerDocument);}

+ Here is the call graph for this function:

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 php4DOMText, php4DOMElement, php4DOMElement, and php4DOMAttr.

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

References _entityDecode().

{return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode(_entityDecode($text)));} //Entity problem reported by AL-DesignWorks 2007-09-07

+ Here is the call graph for this function:

php4DOMNode::set_content (   $text)

Reimplemented in php4DOMText, php4DOMElement, php4DOMElement, and php4DOMAttr.

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 php4DOMText, php4DOMElement, php4DOMElement, and php4DOMAttr.

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

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

Reimplemented in php4DOMText, php4DOMElement, php4DOMElement, and php4DOMAttr.

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::set_namespace (   $uri,
  $prefix = null 
)

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

References $n, and elseif().

{//Contributions by Daniel Walker 2006-09-08
$nsprefix=$this->myDOMNode->lookupPrefix($uri);
if ($nsprefix==null)
{
$nsprefix= $prefix==null ? $nsprefix='a'.sprintf('%u',crc32($uri)) : $prefix;
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE)
{
if (($prefix!=null)&&$this->myDOMNode->ownerElement->hasAttributeNS('http://www.w3.org/2000/xmlns/',$nsprefix)&&
($this->myDOMNode->ownerElement->getAttributeNS('http://www.w3.org/2000/xmlns/',$nsprefix)!=$uri))
{//Remove namespace
$parent=$this->myDOMNode->ownerElement;
$parent->removeAttributeNode($this->myDOMNode);
$parent->setAttribute($this->myDOMNode->localName,$this->myDOMNode->nodeValue);
$this->myDOMNode=$parent->getAttributeNode($this->myDOMNode->localName);
return;
}
$this->myDOMNode->ownerElement->setAttributeNS('http://www.w3.org/2000/xmlns/','xmlns:'.$nsprefix,$uri);
}
}
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE)
{
$parent=$this->myDOMNode->ownerElement;
$parent->removeAttributeNode($this->myDOMNode);
$parent->setAttributeNS($uri,$nsprefix.':'.$this->myDOMNode->localName,$this->myDOMNode->nodeValue);
$this->myDOMNode=$parent->getAttributeNodeNS($uri,$this->myDOMNode->localName);
}
elseif ($this->myDOMNode->nodeType===XML_ELEMENT_NODE)
{
$NewNode=$this->myDOMNode->ownerDocument->createElementNS($uri,$nsprefix.':'.$this->myDOMNode->localName);
foreach ($this->myDOMNode->attributes as $n) $NewNode->appendChild($n->cloneNode(true));
foreach ($this->myDOMNode->childNodes as $n) $NewNode->appendChild($n->cloneNode(true));
$xpath=new DOMXPath($this->myDOMNode->ownerDocument);
$myDOMNodeList=$xpath->query('namespace::*[name()!="xml"]',$this->myDOMNode); //Add old namespaces
foreach ($myDOMNodeList as $n) $NewNode->setAttributeNS('http://www.w3.org/2000/xmlns/',$n->nodeName,$n->nodeValue);
$this->myDOMNode->parentNode->replaceChild($NewNode,$this->myDOMNode);
$this->myDOMNode=$NewNode;
}
}

+ Here is the call graph for this function:

php4DOMNode::unlink_node ( )

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

Referenced by php4DOMElement\unlink().

{
if ($this->myDOMNode->parentNode!=null)
{
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE) $this->myDOMNode->parentNode->removeAttributeNode($this->myDOMNode);
else $this->myDOMNode->parentNode->removeChild($this->myDOMNode);
}
}

+ 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.

{
// 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);
}
}

Field Documentation

php4DOMNode::$myDOMNode

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

Referenced by insert_before(), and replace_node().


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