günaydın,

xml dosyam:


<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <uye>
<ad>aaaaa</ad>
<soyad>xxxx</soyad>
<email>rrrr@adresim</email>
  </uye>











15 Ağustos 2011 17:56 tarihinde Ege Sertçetin <[email protected]> yazdı:

> Selamlar,
>
> Daha önce sitemi Natro Hosting'e taşıdığımda XML okuma ile ilgili
> sorun yaşamıştım. Sonradan sorunun firmadan kaynaklandığını anladım.
> url_fopen kapalı olduğu için çalışmadığını ve açtıklarını
> söylemişlerdi ve sorun da düzelmişti. Eğer kodlarınızdan eminseniz
> buna da bakabilirsiniz.
>
>
> İyi günler,
> Ege Sertçetin.
>
>
> Alinti onuRRR <[email protected]>
>
> > hocam gene olmadı,
> >
> > C:\vkmeyva\deneme>c:\php\php.exe -c c:\WINNT\php.ini
> > c:\vkmeyva\deneme\dene2.php
> > PHP Warning:  simplexml_load_file(): doviz.xml:9: parser error : Extra
> > content at the end of the document in
> > C:\vkmeyva\deneme\dene2.php on line 4
> >
> > Warning: simplexml_load_file(): doviz.xml:9: parser error : Extra content
> at
> > the end of the document in C:\vk
> > meyva\deneme\dene2.php on line 4
> > PHP Warning:  simplexml_load_file(): </xml> in
> C:\vkmeyva\deneme\dene2.php
> > on line 4
> >
> > Warning: simplexml_load_file(): </xml> in C:\vkmeyva\deneme\dene2.php on
> > line 4
> > PHP Warning:  simplexml_load_file(): ^ in C:\vkmeyva\deneme\dene2.php on
> > line 4
> >
> > Warning: simplexml_load_file(): ^ in C:\vkmeyva\deneme\dene2.php on line
> 4
> > PHP Fatal error:  Uncaught exception 'Exception' with message 'String
> could
> > not be parsed as XML' in C:\vkmey
> > va\deneme\dene2.php:5
> > Stack trace:
> > #0 C:\vkmeyva\deneme\dene2.php(5): SimpleXMLElement->__construct('', 1)
> > #1 {main}
> >   thrown in C:\vkmeyva\deneme\dene2.php on line 5
> >
> > Fatal error: Uncaught exception 'Exception' with message 'String could
> not
> > be parsed as XML' in C:\vkmeyva\de
> > neme\dene2.php:5
> > Stack trace:
> > #0 C:\vkmeyva\deneme\dene2.php(5): SimpleXMLElement->__construct('', 1)
> > #1 {main}
> >   thrown in C:\vkmeyva\deneme\dene2.php on line 5
> >
> >
> > 2011/8/15 Mustafa Kahraman <[email protected]>
> >
> >> Oncekinde tirnaklarda hata var !!!
> >> Dogrusu bu
> >>
> >> <?php
> >>
> >> $xml = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
> >>
> >> <uyeler>
> >>   <uye>
> >> <ad>mustafa</ad>
> >> <soyad>tekin</soyad>
> >> <email>mustafa@hedehodo</email>
> >>   </uye>
> >> </uyeler></xml>';
> >>
> >>
> >> $xml = new SimpleXMLElement($xml, TRUE);
> >>
> >>
> >> echo "<pre>";
> >> print_r($xml);
> >> echo "</pre>";
> >>
> >>
> >> echo 'Ad : '.$xml->uye->ad.'<br />';
> >> echo 'Soyad : '.$xml->uye->soyad.'<br />';
> >> echo 'Email : '.$xml->uye->email.'<br />';
> >>
> >> _______________________________________________
> >> Linux-programlama mailing list
> >> [email protected]
> >> https://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >> Liste kurallari: http://liste.linux.org.tr/kurallar.php
> >>
> >>
> >
> >
> > --
> > antiCobol..
> >
>
>
>
> _______________________________________________
> Linux-programlama mailing list
> [email protected]
> https://liste.linux.org.tr/mailman/listinfo/linux-programlama
> Liste kurallari: http://liste.linux.org.tr/kurallar.php
>



-- 
antiCobol..
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap