Connecting Tech Pros Worldwide Forums | Help | Site Map

XML instead of text

Nicos
Guest
 
Posts: n/a
#1: Aug 10 '06
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>

and i get the XML data from other domain as text. How can i get it as
XML?

Thanks,
Nicos


ZeldorBlat
Guest
 
Posts: n/a
#2: Aug 10 '06

re: XML instead of text



Nicos wrote:
Quote:
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>
>
and i get the XML data from other domain as text. How can i get it as
XML?
>
Thanks,
Nicos
XML is text -- in a specific format. I'm not entirely sure what you're
asking.

IchBin
Guest
 
Posts: n/a
#3: Aug 10 '06

re: XML instead of text


ZeldorBlat wrote:
Quote:
Nicos wrote:
Quote:
>Hello people,
>i do this on my domain:
><?php
> header("Content-type: text/xml");
> header("Content-Type: ".$contentType."; charset=UTF-8");
> readfile("http://www.contra.gr/rss/home?type=latest");
>?>
>>
>and i get the XML data from other domain as text. How can i get it as
>XML?
>>
>Thanks,
>Nicos
>
XML is text -- in a specific format. I'm not entirely sure what you're
asking.
>
You have to look at the XML parsing classes to parse the file to extract
the values..

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nicos
Guest
 
Posts: n/a
#4: Aug 11 '06

re: XML instead of text



IchBin wrote:
Quote:
ZeldorBlat wrote:
Quote:
Nicos wrote:
Quote:
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>
>
and i get the XML data from other domain as text. How can i get it as
XML?
>
Thanks,
Nicos
XML is text -- in a specific format. I'm not entirely sure what you're
asking.
>
You have to look at the XML parsing classes to parse the file to extract
the values..
>
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________
>
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Can't i just copy an xml file from another server to mine instead of
parsing the file?

Nicos
Guest
 
Posts: n/a
#5: Aug 11 '06

re: XML instead of text



ZeldorBlat wrote:
Quote:
Nicos wrote:
Quote:
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>

and i get the XML data from other domain as text. How can i get it as
XML?

Thanks,
Nicos
>
XML is text -- in a specific format. I'm not entirely sure what you're
asking.
When i open this file in Internet Explorer or Firfox, it doesn't show
the xml file as usual. (with +'s and -'s) just a plain uncolored text.

IchBin
Guest
 
Posts: n/a
#6: Aug 11 '06

re: XML instead of text


Nicos wrote:
Quote:
IchBin wrote:
Quote:
>ZeldorBlat wrote:
Quote:
>>Nicos wrote:
>>>Hello people,
>>>i do this on my domain:
>>><?php
>>> header("Content-type: text/xml");
>>> header("Content-Type: ".$contentType."; charset=UTF-8");
>>> readfile("http://www.contra.gr/rss/home?type=latest");
>>>?>
>>>>
>>>and i get the XML data from other domain as text. How can i get it as
>>>XML?
>>>>
>>>Thanks,
>>>Nicos
>>XML is text -- in a specific format. I'm not entirely sure what you're
>>asking.
>>>
>You have to look at the XML parsing classes to parse the file to extract
>the values..
>>
>Thanks in Advance...
>IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
>_________________________________________________ _________________________
>>
>'If there is one, Knowledge is the "Fountain of Youth"'
>-William E. Taylor, Regular Guy (1952-)
>
Can't i just copy an xml file from another server to mine instead of
parsing the file?
>
Sorry, then I do not understand the value of this xml file. What is it's
purpose?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Tim Hunt
Guest
 
Posts: n/a
#7: Aug 11 '06

re: XML instead of text



Nicos wrote:
Quote:
ZeldorBlat wrote:
Quote:
Nicos wrote:
Quote:
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>
>
and i get the XML data from other domain as text. How can i get it as
XML?
>
Thanks,
Nicos
XML is text -- in a specific format. I'm not entirely sure what you're
asking.
>
When i open this file in Internet Explorer or Firfox, it doesn't show
the xml file as usual. (with +'s and -'s) just a plain uncolored text.
I get highlighted text with +'s and -'s in both FF and IE

Tim

Tim Hunt
Guest
 
Posts: n/a
#8: Aug 11 '06

re: XML instead of text



Tim Hunt wrote:
Quote:
Nicos wrote:
Quote:
ZeldorBlat wrote:
Quote:
Nicos wrote:
Hello people,
i do this on my domain:
<?php
header("Content-type: text/xml");
header("Content-Type: ".$contentType."; charset=UTF-8");
readfile("http://www.contra.gr/rss/home?type=latest");
?>

and i get the XML data from other domain as text. How can i get it as
XML?

Thanks,
Nicos
>
XML is text -- in a specific format. I'm not entirely sure what you're
asking.
When i open this file in Internet Explorer or Firfox, it doesn't show
the xml file as usual. (with +'s and -'s) just a plain uncolored text.
>
I get highlighted text with +'s and -'s in both FF and IE
>
Tim
Duh. I was looking at www.contra.gr not your copy

Try using the same content-type as them, application/xml

Tim

Closed Thread