ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
php4DOMDocument Class Reference
+ Inheritance diagram for php4DOMDocument:
+ Collaboration diagram for php4DOMDocument:

Public Member Functions

 php4DOMDocument ($source, $file=true)
 xpath_init ()
 free ()
 xpath_new_context ()
 dump_node ($node)
 validate (&$error)
 create_attribute ($name, $value)
 create_cdata_section ($content)
 create_comment ($data)
 create_element ($name)
 create_text_node ($content)
 document_element ()
 dump_file ($filename, $compressionmode=false, $format=false)
 dump_mem ($format=false, $encoding=false)
 get_elements_by_tagname ($name)
 html_dump_mem ()
 php4DOMDocument ($mode=DOMXML_LOAD_PARSING)
 add_root ($name)
 create_attribute ($name, $value)
 create_cdata_section ($content)
 create_comment ($data)
 create_element ($name)
 create_element_ns ($uri, $name, $prefix=null)
 create_entity_reference ($content)
 create_processing_instruction ($target, $data='')
 create_text_node ($content)
 document_element ()
 dump_file ($filename, $compressionmode=false, $format=false)
 dump_mem ($format=false, $encoding=false)
 free ()
 get_element_by_id ($id)
 get_elements_by_tagname ($name)
 html_dump_mem ()
 root ()
 xinclude ()
 xpath_new_context ()
 php4DOMDocument ($filename='')
 create_attribute ($name, $value)
 create_cdata_section ($content)
 create_comment ($data)
 create_element ($name)
 create_text_node ($content)
 document_element ()
 dump_file ($filename, $compressionmode=false, $format=false)
 dump_mem ($format=false, $encoding=false)
 get_element_by_id ($id)
 get_elements_by_tagname ($name)
 html_dump_mem ()
 root ()
 php4DOMDocument ($source, $file=true)
 xpath_init ()
 free ()
 xpath_new_context ()
 dump_node ($node)
 validate (&$error)
 create_attribute ($name, $value)
 create_cdata_section ($content)
 create_comment ($data)
 create_element ($name)
 create_text_node ($content)
 document_element ()
 dump_file ($filename, $compressionmode=false, $format=false)
 dump_mem ($format=false, $encoding=false)
 get_elements_by_tagname ($name)
 html_dump_mem ()
- 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 ()
 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)
 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)

Data Fields

 $myDOMDocument
- Data Fields inherited from php4DOMNode
 $myDOMNode
 $myOwnerDocument

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

php4DOMDocument::add_root (   $name)

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

{
if ($this->myDOMNode->hasChildNodes()) $this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return new php4DOMElement($this->myDOMNode->appendChild($this->myDOMNode->createElement($name)),$this->myOwnerDocument);
}
php4DOMDocument::create_attribute (   $name,
  $value 
)

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

{
echo "-B";
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr,$this);
}
php4DOMDocument::create_attribute (   $name,
  $value 
)

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

{
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=htmlspecialchars($value,ENT_QUOTES);
return new php4DOMAttr($myAttr,$this);
}
php4DOMDocument::create_attribute (   $name,
  $value 
)

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

{
$myAttr=$this->myDOMDocument->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr);
}
php4DOMDocument::create_attribute (   $name,
  $value 
)

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

{
$myAttr=$this->myDOMDocument->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr);
}
php4DOMDocument::create_cdata_section (   $content)

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

References php4DOMNode\php4DOMNode().

{
echo "-C";
return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);
}

+ Here is the call graph for this function:

php4DOMDocument::create_cdata_section (   $content)

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

References php4DOMNode\php4DOMNode().

{return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}

+ Here is the call graph for this function:

php4DOMDocument::create_cdata_section (   $content)

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

{
return new php4DOMCDATASection($this->myDOMDocument->createCDATASection($content));
}
php4DOMDocument::create_cdata_section (   $content)

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

{
return new php4DOMCDATASection($this->myDOMDocument->createCDATASection($content));
}
php4DOMDocument::create_comment (   $data)

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

References $data, and php4DOMNode\php4DOMNode().

{
echo "-D";
return new php4DOMNode($this->myDOMNode->createComment($data),$this);
}

+ Here is the call graph for this function:

php4DOMDocument::create_comment (   $data)

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

References $data, and php4DOMNode\php4DOMNode().

{return new php4DOMNode($this->myDOMNode->createComment($data),$this);}

+ Here is the call graph for this function:

php4DOMDocument::create_comment (   $data)

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

References $data.

{
return new php4DOMElement($this->myDOMDocument->createComment($data));
}
php4DOMDocument::create_comment (   $data)

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

References $data.

{
return new php4DOMElement($this->myDOMDocument->createComment($data));
}
php4DOMDocument::create_element (   $name)

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

{return new php4DOMElement($this->myDOMNode->createElement($name),$this);}
php4DOMDocument::create_element (   $name)

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

{
echo "-E";
return new php4DOMElement($this->myDOMNode->createElement($name),$this);
}
php4DOMDocument::create_element (   $name)

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

{
return new php4DOMElement($this->myDOMDocument->createElement($name));
}
php4DOMDocument::create_element (   $name)

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

{
return new php4DOMElement($this->myDOMDocument->createElement($name));
}
php4DOMDocument::create_element_ns (   $uri,
  $name,
  $prefix = null 
)

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

{
if ($prefix==null) $prefix=$this->myDOMNode->lookupPrefix($uri);
if (($prefix==null)&&(($this->myDOMNode->documentElement==null)||(!$this->myDOMNode->documentElement->isDefaultNamespace($uri)))) $prefix='a'.sprintf('%u',crc32($uri));
return new php4DOMElement($this->myDOMNode->createElementNS($uri,$prefix==null ? $name : $prefix.':'.$name),$this);
}
php4DOMDocument::create_entity_reference (   $content)

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

References php4DOMNode\php4DOMNode().

{return new php4DOMNode($this->myDOMNode->createEntityReference($content),$this);} //By Walter Ebert 2007-01-22

+ Here is the call graph for this function:

php4DOMDocument::create_processing_instruction (   $target,
  $data = '' 
)

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

References $data.

{return new php4DomProcessingInstruction($this->myDOMNode->createProcessingInstruction($target,$data),$this);}
php4DOMDocument::create_text_node (   $content)

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

References php4DOMNode\php4DOMNode().

{
echo "-F";
return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);
}

+ Here is the call graph for this function:

php4DOMDocument::create_text_node (   $content)

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

{return new php4DOMText($this->myDOMNode->createTextNode($content),$this);}
php4DOMDocument::create_text_node (   $content)

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

References php4DOMNode\php4DOMNode().

{
return new php4DOMNode($this->myDOMDocument->createTextNode($content));
}

+ Here is the call graph for this function:

php4DOMDocument::create_text_node (   $content)

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

References php4DOMNode\php4DOMNode().

{
return new php4DOMNode($this->myDOMDocument->createTextNode($content));
}

+ Here is the call graph for this function:

php4DOMDocument::document_element ( )

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

References php4DOMNode\_newDOMElement().

{ return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}

+ Here is the call graph for this function:

php4DOMDocument::document_element ( )

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

{
echo "-G";
return new php4DOMElement($this->myDOMNode->documentElement,$this);
}
php4DOMDocument::document_element ( )

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

{
return new php4DOMElement($this->myDOMDocument->documentElement);
}
php4DOMDocument::document_element ( )

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

{
return new php4DOMElement($this->myDOMDocument->documentElement);
}
php4DOMDocument::dump_file (   $filename,
  $compressionmode = false,
  $format = false 
)

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

References $filename, and $res.

{
$format0=$this->myDOMNode->formatOutput;
$this->myDOMNode->formatOutput=$format;
$res=$this->myDOMNode->save($filename);
$this->myDOMNode->formatOutput=$format0;
return $res;
}
php4DOMDocument::dump_file (   $filename,
  $compressionmode = false,
  $format = false 
)

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

References $filename.

{
echo "-H";
return $this->myDOMNode->save($filename);
}
php4DOMDocument::dump_file (   $filename,
  $compressionmode = false,
  $format = false 
)

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

References $filename.

{
return $this->myDOMDocument->save($filename);
}
php4DOMDocument::dump_file (   $filename,
  $compressionmode = false,
  $format = false 
)

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

References $filename.

{
return $this->myDOMDocument->save($filename);
}
php4DOMDocument::dump_mem (   $format = false,
  $encoding = false 
)

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

{
$format0=$this->myDOMNode->formatOutput;
$this->myDOMNode->formatOutput=$format;
$encoding0=$this->myDOMNode->encoding;
if ($encoding) $this->myDOMNode->encoding=$encoding;
$dump=$this->myDOMNode->saveXML();
$this->myDOMNode->formatOutput=$format0;
if ($encoding) $this->myDOMNode->encoding= $encoding0=='' ? 'UTF-8' : $encoding0; //UTF-8 is XML default encoding
return $dump;
}
php4DOMDocument::dump_mem (   $format = false,
  $encoding = false 
)

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

{
echo "-I";
return $this->myDOMNode->saveXML();
}
php4DOMDocument::dump_mem (   $format = false,
  $encoding = false 
)

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

{
return $this->myDOMDocument->saveXML();
}
php4DOMDocument::dump_mem (   $format = false,
  $encoding = false 
)

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

{
return $this->myDOMDocument->saveXML();
}
php4DOMDocument::dump_node (   $node)

Reimplemented from php4DOMNode.

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

{
$str = $this->myDOMDocument->saveXML($node->myDOMNode);
return $str;
}
php4DOMDocument::dump_node (   $node)

Reimplemented from php4DOMNode.

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

{
$str = $this->myDOMDocument->saveXML($node->myDOMNode);
return $str;
}
php4DOMDocument::free ( )

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

{
unset($this->myDOMDocument);
}
php4DOMDocument::free ( )

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

{
unset($this->myDOMDocument);
}
php4DOMDocument::free ( )

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

{
if ($this->myDOMNode->hasChildNodes()) $this->myDOMNode->removeChild($this->myDOMNode->firstChild);
$this->myDOMNode=null;
$this->myOwnerDocument=null;
}
php4DOMDocument::get_element_by_id (   $id)

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

{
echo "-J";
return new php4DOMElement($this->myDOMNode->getElementById($id),$this);
}
php4DOMDocument::get_element_by_id (   $id)

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

References php4DOMNode\_newDOMElement().

{return parent::_newDOMElement($this->myDOMNode->getElementById($id),$this);}

+ Here is the call graph for this function:

php4DOMDocument::get_elements_by_tagname (   $name)

Definition at line 169 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);
return $nodeSet;
}
php4DOMDocument::get_elements_by_tagname (   $name)

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

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

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

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

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

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

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

{return $this->myDOMNode->saveHTML();}
php4DOMDocument::html_dump_mem ( )

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

{
echo "-L";
return $this->myDOMNode->saveHTML();
}
php4DOMDocument::html_dump_mem ( )

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

{
return $this->myDOMDocument->saveHTML();
}
php4DOMDocument::html_dump_mem ( )

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

{
return $this->myDOMDocument->saveHTML();
}
php4DOMDocument::php4DOMDocument (   $source,
  $file = true 
)

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

References $file.

{
$this->myDOMDocument=new DOMDocument();
if ($file)
{
$this->myDOMDocument->load($source);
}
else
{
$this->myDOMDocument->loadXML($source);
}
}
php4DOMDocument::php4DOMDocument (   $filename = '')

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

References $filename.

{
echo "-A";
$this->myDOMNode=new DOMDocument();
if ($filename!='') $this->myDOMNode->load($filename);
}
php4DOMDocument::php4DOMDocument (   $source,
  $file = true 
)

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

References $file, and staticxmlerror().

{
$this->myDOMDocument=new DOMDocument();
// temporary set error handler
set_error_handler('staticxmlerror');
$old = ini_set('html_errors', false);
if (is_object($source))
{
$this->myDOMDocument = $source;
$this->success = true;
}
else
{
if ($file)
{
$this->success = @$this->myDOMDocument->load($source);
}
else
{
$this->success = $this->myDOMDocument->loadXML($source);
}
}
// Restore error handling
ini_set('html_errors', $old);
restore_error_handler();
if (!$this->success)
{
$this->error_arr = staticxmlerror(null, null, null, null, null, true);
foreach($this->error_arr as $error)
{
$error = str_replace("DOMDocument::loadXML():", "", $error);
$this->error.= $error."<br />";
}
}
}

+ Here is the call graph for this function:

php4DOMDocument::php4DOMDocument (   $mode = DOMXML_LOAD_PARSING)

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

References DOMXML_LOAD_DONT_KEEP_BLANKS, DOMXML_LOAD_RECOVERING, DOMXML_LOAD_SUBSTITUTE_ENTITIES, and DOMXML_LOAD_VALIDATING.

{
$this->myDOMNode=new DOMDocument();
$this->myOwnerDocument=$this;
if ($mode & DOMXML_LOAD_VALIDATING) $this->myDOMNode->validateOnParse=true;
if ($mode & DOMXML_LOAD_RECOVERING) $this->myDOMNode->recover=true;
if ($mode & DOMXML_LOAD_SUBSTITUTE_ENTITIES) $this->myDOMNode->substituteEntities=true;
if ($mode & DOMXML_LOAD_DONT_KEEP_BLANKS) $this->myDOMNode->preserveWhiteSpace=false;
}
php4DOMDocument::root ( )

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

References php4DOMNode\_newDOMElement().

{return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}

+ Here is the call graph for this function:

php4DOMDocument::root ( )

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

{
echo "-M";
return new php4DOMElement($this->myDOMNode->documentElement,$this);
}
php4DOMDocument::validate ( $error)

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

References $ok.

{
$ok = $this->myDOMDocument->validate();
if (!$ok)
{
$error = array(array("0", "Unknown Error"));
}
return $error;
}
php4DOMDocument::validate ( $error)

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

References $ok.

{
$ok = $this->myDOMDocument->validate();
if (!$ok)
{
$error = array(array("0", "Unknown Error"));
if (function_exists("libxml_get_last_error"))
{
$err = libxml_get_last_error();
if (is_object($err))
{
$error = array(array($err->code, $err->message));
}
}
}
return $error;
}
php4DOMDocument::xinclude ( )

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

{return $this->myDOMNode->xinclude();}
php4DOMDocument::xpath_init ( )

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

{
}
php4DOMDocument::xpath_init ( )

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

{
}
php4DOMDocument::xpath_new_context ( )

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

References xpath_new_context().

{
return xpath_new_context($this);
}

+ Here is the call graph for this function:

php4DOMDocument::xpath_new_context ( )

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

Referenced by xpath_new_context().

{
return xpath_new_context($this);
}

+ Here is the caller graph for this function:

php4DOMDocument::xpath_new_context ( )

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

{return new php4DOMXPath($this);}

Field Documentation

php4DOMDocument::$myDOMDocument

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


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