]>
src.bluestatic.org Git - isso.git/blob - php520-test/SimpleXml.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright ©2002-[#]year[#] Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 header('Content-Type: text/html; charset=utf8');
25 $data = file_get_contents('../docs/xmltest.xml');
26 $xml = new SimpleXMLElement($data);
28 print_r($xml->download
[1]->date
->timestamp
->attributes());
30 // utf8 - no header tag
32 <moo>הודעות של צור קשר לא מגיעות לשום מקום</moo>
34 $xml = new SimpleXmlElement($data);
38 $data = '<?xml version="1.0" encoding="utf-8" ?>
40 <moo>הודעות של צור קשר לא מגיעות לשום מקום</moo>
42 $xml = new SimpleXmlElement($data);
46 /*=====================================================================*\
47 || ###################################################################
50 || ###################################################################
51 \*=====================================================================*/