phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: etemplate/inc class.xmltool.inc.php,1.3,1.4


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate/inc class.xmltool.inc.php,1.3,1.4
Date: Tue, 01 Oct 2002 19:35:32 -0400

Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv29763

Modified Files:
        class.xmltool.inc.php 
Log Message:
identstring added to constructor and inherited to children

Index: class.xmltool.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.xmltool.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.xmltool.inc.php       1 Oct 2002 22:22:02 -0000       1.3
--- class.xmltool.inc.php       1 Oct 2002 23:35:30 -0000       1.4
***************
*** 2,7 ****
        function var2xml($name, $data)
        {
!               $doc = new xmltool();
!               $doc->indentstring = '';
                return $doc->import_var($name,$data,True,True);
        }
--- 2,6 ----
        function var2xml($name, $data)
        {
!               $doc = new xmltool('root','','');
                return $doc->import_var($name,$data,True,True);
        }
***************
*** 23,29 ****
                
                /* start the class as either a root or a node */
!               function xmltool ($node_type = 'root', $name='')
                {
                        $this->node_type = $node_type;
                        if ($this->node_type == 'node')
                        {
--- 22,29 ----
                
                /* start the class as either a root or a node */
!               function xmltool ($node_type = 'root', 
$name='',$indentstring="\t")
                {
                        $this->node_type = $node_type;
+                       $this->indentstring = $indentstring;
                        if ($this->node_type == 'node')
                        {
***************
*** 156,160 ****
                function import_var($name, 
$value,$is_root=False,$export_xml=False)
                {
!                       $node = new xmltool('node',$name);
                        switch (gettype($value))
                        {
--- 156,161 ----
                function import_var($name, 
$value,$is_root=False,$export_xml=False)
                {
!                       echo "<p>import_var: 
this->indentstring='$this->indentstring'</p>\n";
!                       $node = new xmltool('node',$name,$this->indentstring);
                        switch (gettype($value))
                        {
***************
*** 209,218 ****
                                                        case 'double':
                                                        case 'NULL':
!                                                               $subnode = new 
xmltool('node', $nextkey);
                                                                
$subnode->set_value($val);
                                                                
$node->add_node($subnode);                                                      
                                                                break;
                                                        case 'boolean':
!                                                               $subnode = new 
xmltool('node', $nextkey);
                                                                if($val == True)
                                                                {
--- 210,219 ----
                                                        case 'double':
                                                        case 'NULL':
!                                                               $subnode = new 
xmltool('node', $nextkey,$this->indentstring);
                                                                
$subnode->set_value($val);
                                                                
$node->add_node($subnode);                                                      
                                                                break;
                                                        case 'boolean':
!                                                               $subnode = new 
xmltool('node', $nextkey,$this->indentstring);
                                                                if($val == True)
                                                                {
***************
*** 240,244 ****
                                                                break;
                                                        case 'object':
!                                                               $subnode = new 
xmltool('node', $nextkey);
                                                                
$subnode->set_value('PHP_SERIALIZED_OBJECT&:'.serialize($val));
                                                                
$node->add_node($subnode);                                                      
--- 241,245 ----
                                                                break;
                                                        case 'object':
!                                                               $subnode = new 
xmltool('node', $nextkey,$this->indentstring);
                                                                
$subnode->set_value('PHP_SERIALIZED_OBJECT&:'.serialize($val));
                                                                
$node->add_node($subnode);                                                      
***************
*** 379,383 ****
                                        case 'cdata':
                                        case 'complete':
!                                               $node = new 
xmltool('node',$data[$i]['tag']);
                                                
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
                                                {
--- 380,384 ----
                                        case 'cdata':
                                        case 'complete':
!                                               $node = new 
xmltool('node',$data[$i]['tag'],$this->indentstring);
                                                
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
                                                {
***************
*** 391,395 ****
                                                break;
                                        case 'open':
!                                               $node = new 
xmltool('node',$data[$i]['tag']);
                                                
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
                                                {
--- 392,396 ----
                                                break;
                                        case 'open':
!                                               $node = new 
xmltool('node',$data[$i]['tag'],$this->indentstring);
                                                
if(is_array($data[$i]['attributes']) && count($data[$i]['attributes']) > 0)
                                                {
***************
*** 417,421 ****
                        xml_parser_free($parser);
                        unset($index);  
!                       $node = new xmltool('node',$vals[0]['tag']);
                        if(isset($vals[0]['attributes']))
                        {
--- 418,422 ----
                        xml_parser_free($parser);
                        unset($index);  
!                       $node = new 
xmltool('node',$vals[0]['tag'],$this->indentstring);
                        if(isset($vals[0]['attributes']))
                        {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]