Public Member Functions | Data Fields

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

Data Fields

 $myDOMDocument

Detailed Description

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


Member Function Documentation

php4DOMDocument::create_attribute ( name,
value 
)

Definition at line 179 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 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 135 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 187 of file inc.xml5compliance.php.

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

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 143 of file inc.xml5compliance.php.

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

php4DOMDocument::create_comment ( data  ) 

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

References $data.

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

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 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_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 197 of file inc.xml5compliance.php.

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

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_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 202 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 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::document_element (  ) 

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

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

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 207 of file inc.xml5compliance.php.

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

php4DOMDocument::dump_file ( filename,
compressionmode = false,
format = false 
)

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

        {
                return $this->myDOMDocument->save($filename);
        }

php4DOMDocument::dump_file ( filename,
compressionmode = false,
format = false 
)

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

        {
                return $this->myDOMDocument->save($filename);
        }

php4DOMDocument::dump_file ( filename,
compressionmode = false,
format = false 
)

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

        {
echo "-H";
                return $this->myDOMNode->save($filename);
        }

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

        {
echo "-I";
                return $this->myDOMNode->saveXML();
        }

php4DOMDocument::dump_mem ( format = false,
encoding = false 
)

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

        {
                return $this->myDOMDocument->saveXML();
        }

php4DOMDocument::dump_node ( node  ) 

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

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

php4DOMDocument::dump_node ( node  ) 

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::get_element_by_id ( id  ) 

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

References $id.

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

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 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 222 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 236 of file inc.xml5compliance.php.

        {
                return $this->myDOMDocument->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 184 of file domxml-php4-php5.php.

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

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

        {
echo "-A";
                $this->myDOMNode=new DOMDocument();
                if ($filename!='') $this->myDOMNode->load($filename);
        }

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 169 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 125 of file inc.xml5compliance.php.

References $ok.

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

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:


Field Documentation

php4DOMDocument::$myDOMDocument

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


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