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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.