[Phpxd-commits] CVS: phpXD phpXD.php,1.13,1.14 sample.php,1.1.1.1,1.2 sample.xml,1.1.1.1,1.2
Status: Beta
Brought to you by:
growbal
|
From: Thomas D. <th...@us...> - 2001-07-11 21:35:28
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv5317
Modified Files:
phpXD.php sample.php sample.xml
Log Message:
Fixed bug in saveFile.
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** phpXD.php 2001/06/28 22:22:49 1.13
--- phpXD.php 2001/07/11 21:35:25 1.14
***************
*** 176,180 ****
$fp = fopen($file, "w");
fwrite($fp, "<?xml version=\"1.0\"?>\n"); // <?
! $this->saveTree($this->document, 0, true, &$text);
fwrite($fp, $text);
fclose($fp);
--- 176,180 ----
$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.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** sample.php 2001/06/21 18:59:36 1.1.1.1
--- sample.php 2001/07/11 21:35:25 1.2
***************
*** 171,174 ****
--- 171,178 ----
$dom = new phpXD("sample.xml");
+ $dom->document->documentElement->appendChild($dom->document->createTextNode("a"));
+ $dom->document->documentElement->appendChild($dom->document->createTextNode(" "));
+ $dom->document->documentElement->appendChild($dom->document->createTextNode("b"));
+ $dom->document->documentElement->normalize();
echoTree($dom->document);
Index: sample.xml
===================================================================
RCS file: /cvsroot/phpxd/phpXD/sample.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** sample.xml 2001/06/21 18:59:36 1.1.1.1
--- sample.xml 2001/07/11 21:35:25 1.2
***************
*** 1,9 ****
<?xml version="1.0"?>
! <hello>
This is a phpXD sample dokument.
Here are some sample XML features.
! <a_child>
Hello World.
! </a_child>
<an_empty_child />
<!-- This is a comment... -->
--- 1,9 ----
<?xml version="1.0"?>
! <dc:hello xmlns:dc="http://www.w3.org/XML/1998/namespace">
This is a phpXD sample dokument.
Here are some sample XML features.
! <dc:a_child>
Hello World.
! </dc:a_child>
<an_empty_child />
<!-- This is a comment... -->
***************
*** 13,15 ****
echo "PHP is cool";
?>
! </hello>
--- 13,15 ----
echo "PHP is cool";
?>
! </dc:hello>
|