Jump to content

Reading data from .xml file into .txt file with php script


foggykt

Recommended Posts

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.