[Phpxd-commits] CVS: phpXD phpXD.php,1.22,1.23 sample.php,1.4,1.5
Status: Beta
Brought to you by:
growbal
From: Thomas D. <th...@us...> - 2001-12-01 23:51:16
|
Update of /cvsroot/phpxd/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv22984 Modified Files: phpXD.php sample.php Log Message: Fixed some warnings, i.e. some deprecated calls which cause a warning if allow_call_time_pass_reference=off. Index: phpXD.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** phpXD.php 2001/11/29 20:37:29 1.22 --- phpXD.php 2001/12/01 23:51:12 1.23 *************** *** 67,71 **** * @type boolean */ ! var $parseCData; /** --- 67,71 ---- * @type boolean */ ! var $parseCData = false; /** *************** *** 75,79 **** * @type string */ ! var $parsedDTD; /** --- 75,79 ---- * @type string */ ! var $parsedDTD = false; /** *************** *** 119,123 **** */ function loadFile($file) { ! if (file_exists($file) && is_readable($file)) { $content = implode("", file($file)); --- 119,123 ---- */ function loadFile($file) { ! if (file_exists($file)) { // && is_readable($file)) { $content = implode("", file($file)); *************** *** 129,133 **** xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); ! xml_set_object($parser, &$this); xml_set_element_handler($parser, "handleStartElement", --- 129,133 ---- xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); ! xml_set_object($parser, $this); xml_set_element_handler($parser, "handleStartElement", *************** *** 165,169 **** $fp = fopen($file, "w"); fwrite($fp, "<?xml version=\"1.0\"?>\n"); ! $this->saveTree($this->document, 0, $trim, &$text); fwrite($fp, $text); fclose($fp); --- 165,169 ---- $fp = fopen($file, "w"); fwrite($fp, "<?xml version=\"1.0\"?>\n"); ! $this->saveTree($this->document, 0, $trim, $text); fwrite($fp, $text); fclose($fp); Index: sample.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/sample.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** sample.php 2001/11/26 21:27:36 1.4 --- sample.php 2001/12/01 23:51:12 1.5 *************** *** 119,125 **** } if ($dom->nodeType == TEXT_NODE) { ! echo $space; ! echo htmlspecialchars($dom->getData()); ! echo "<br />"; } if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) { --- 119,129 ---- } if ($dom->nodeType == TEXT_NODE) { ! if (trim($dom->getData()) != "") { ! echo $space; ! } ! echo htmlspecialchars(trim($dom->getData())); ! if (trim($dom->getData()) != "") { ! echo "<br />"; ! } } if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) { *************** *** 148,152 **** } ! $dom = new phpXD("sample.xml"); echoTree($dom->document); ?> --- 152,156 ---- } ! $dom = new phpXD("test.xml"); echoTree($dom->document); ?> |