foggykt Posted April 19, 2011 Share Posted April 19, 2011 Well, im a n00b for php, and what i need is a php script which will read data from .xml file and write it into .txt file. Can someone help me? Example of .xml file : <?xml version="1.0" encoding="utf-8"?> <tv generator-info-name="NeTXMLTV/1.0.0.0" source-info-url="http://www.net-tv.hr/" source-info-name="NeT TV XMLTV" source-data-url="http://www.net-tv.hr/xmltv/net-pregled-programa-xmltv.xml"> <programme channel="NeT TV" start="20110413063000 +0200" stop="20110413080000 +0200"> <title lang="hr">JUTARNJI EXPRESS</title> <category lang="hr">glazbeno-informativni program</category> <desc lang="hr">Glazbeno informativna emisija sa servisnim informacijama i jutarnjim temperaturama, idealna za jutarnje buđenje uz toplu kavu ili čaj....</desc> </programme> </tv> I need the .txt file to look like this: 201104130630 - 201104130800 JUTARNJI EXPRESS glazbeno-informativni program Glazbeno informativna emisija sa servisnim informacijama i jutarnjim temperaturama, idealna za jutarnje buđenje uz toplu kavu ili čaj.... Can someone please help me? Thx Quote Link to comment https://forums.phpfreaks.com/topic/234130-reading-data-from-xml-file-into-txt-file-with-php-script/ Share on other sites More sharing options...
maxudaskin Posted April 19, 2011 Share Posted April 19, 2011 An XML file is essentially a TXT file. If you want to copy it all over without changing it, you can just change the file type. Quote Link to comment https://forums.phpfreaks.com/topic/234130-reading-data-from-xml-file-into-txt-file-with-php-script/#findComment-1203357 Share on other sites More sharing options...
foggykt Posted April 19, 2011 Author Share Posted April 19, 2011 well, i would appreciate the code for it, for reading the parts that i mentioned above Quote Link to comment https://forums.phpfreaks.com/topic/234130-reading-data-from-xml-file-into-txt-file-with-php-script/#findComment-1203358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.