cvs: pear /XML_sql2xml sql2xml.php

From: Date: Wed, 29 Aug 2001 07:23:06 +0000
Subject: cvs: pear /XML_sql2xml sql2xml.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-687@lists.php.net to get a copy of this message
chregu Wed Aug 29 03:23:06 2001 EDT Modified files: /pear/XML_sql2xml sql2xml.php Log: - there was some unnecessary debug stuff in it... removed Index: pear/XML_sql2xml/sql2xml.php diff -u pear/XML_sql2xml/sql2xml.php:1.6 pear/XML_sql2xml/sql2xml.php:1.7 --- pear/XML_sql2xml/sql2xml.php:1.6 Tue Aug 28 13:22:52 2001 +++ pear/XML_sql2xml/sql2xml.php Wed Aug 29 03:23:05 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker <chregu@phant.ch> | // +----------------------------------------------------------------------+ // -// $Id: sql2xml.php,v 1.6 2001/08/28 17:22:52 chregu Exp $ +// $Id: sql2xml.php,v 1.7 2001/08/29 07:23:05 chregu Exp $ /** * This class takes a PEAR::DB-Result Object, a sql-query-string or an array @@ -48,7 +48,7 @@ * http://php.chregu.tv/sql2xml * * @author Christian Stocker <chregu@nomad.ch> -* @version $Id: sql2xml.php,v 1.6 2001/08/28 17:22:52 chregu Exp $ +* @version $Id: sql2xml.php,v 1.7 2001/08/29 07:23:05 chregu Exp $ * @package XML */ class XML_sql2xml { @@ -781,8 +781,9 @@ //check if we have a recent domxml. otherwise use the workaround... $version = explode(".",phpversion()); + if (! ($version[0] <= 4 and $version[1] <= 0 and $version[2] < 7) ){ - + if (is_array($xpath)) { if (isset($xpath["root"])) @@ -794,6 +795,7 @@ $tmpxml = xmldoc($string); $subroot = $this->xmlroot; + if (isset($root)) { $roots = explode("/",$root); @@ -801,7 +803,6 @@ { if ( strlen($rootelement) > 0 ) { - print "$rootelement<br>"; $subroot = $subroot->new_child($rootelement,""); } } @@ -809,7 +810,7 @@ //$this->xmlroot->addchild does some strange things when added nodes from xpath.... so this comment helps out - $newchild = $subroot->add_child($this->xmldoc->create_comment("the purpose of this comment was a workaround in sql2php.php line ".__LINE__)); + $newchild = $subroot->add_child($this->xmldoc->create_comment("the purpose of this comment is a workaround in sql2php.php line ".__LINE__)); // if no xpath is given, just take the whole file @@ -821,12 +822,12 @@ { $xctx = $tmpxml->xpath_new_context(); $xnode = xpath_eval($xctx,$xpath); - debug::print_rp($xnode); foreach ($xnode->nodeset as $node) { $newchild->append_child($node); } } + } else { $MainXmlString = $this->xmldoc->dumpmem();

« previous php.pear.cvs (#687) next »