denoteone Posted January 28, 2010 Share Posted January 28, 2010 I am trying to grab the contents of an XML page and then write them to a local file on my server, but when I echo the contents I am not getting the XML tags? <?PHP $url = 'http://www.sitethathostxml.com/myfile.xml'; $str = file_get_contents($url); echo $str; ?> my echo is just the text and not the tags? Should I use another function to pull the data? Link to comment https://forums.phpfreaks.com/topic/190151-get-xml-data-and-write-to-file/ Share on other sites More sharing options...
Alex Posted January 28, 2010 Share Posted January 28, 2010 Did you view the source? If you're just echoing it out normally you won't be able to see the tags.. Link to comment https://forums.phpfreaks.com/topic/190151-get-xml-data-and-write-to-file/#findComment-1003254 Share on other sites More sharing options...
denoteone Posted January 28, 2010 Author Share Posted January 28, 2010 Wow. I am an idiot sometimes. Thanks! Link to comment https://forums.phpfreaks.com/topic/190151-get-xml-data-and-write-to-file/#findComment-1003255 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.