BlueEyes Posted April 14, 2007 Share Posted April 14, 2007 ok guys, i want to create some xml code with php. My code looks like this: $send_xml='<?xml version="1.0" encoding="ISO-8859-1" ?>'."\n". '<xml><bob version="1.0">'."\n". ' <test1>'.$test1.'</test1>'."\n". ' <test2>OK</test2>'."\n". '</bob></xml>'."\n"; } echo $send_xml; but the firefox wont show it as an xml tree, neither does the internet explorer. what am i missing here? btw, when i save the particular page as .xml it works. Link to comment https://forums.phpfreaks.com/topic/47022-creating-xml-code-with-php/ Share on other sites More sharing options...
fert Posted April 14, 2007 Share Posted April 14, 2007 do you have? header("Content-type: text/xml"); Link to comment https://forums.phpfreaks.com/topic/47022-creating-xml-code-with-php/#findComment-229316 Share on other sites More sharing options...
BlueEyes Posted April 14, 2007 Author Share Posted April 14, 2007 yea that was it! thanks for your quick reply! by the way, does anybody have any useful hints or links regarding xml and php? i have to develop an interface between 2 companies which have to share information. thanks in advance Link to comment https://forums.phpfreaks.com/topic/47022-creating-xml-code-with-php/#findComment-229318 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.