Jump to content

output xml file


n2learning

Recommended Posts

I am using SimpleXMLElement to generate an xml file.

 

I am having some difficulty with formating the file. Hoping someone can assist.

(not having problem getting the data...just unsure when to use ->addChild, ->addAttribute and anything else)

 

This is the structure of how the file needs to be appear:

 

<?xml version="1.0"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" >
<channel>
<title>MRSS Playlist</title>
<item>
<title>Cardio routine with handweights</title>
<media:content url="videos/set2_first_5min.flv" />
<media:thumbnail url="thumbs/set2_first.png" />
<description>side jumps, arm curls, leg squats, arm lifts</description>
<jwplayer:duration>25</jwplayer:duration> 
<jwplayer:start>5</jwplayer:start> 
</item>
</channel>
</rss>

 

Thanks as always!

DK

Link to comment
https://forums.phpfreaks.com/topic/260362-output-xml-file/
Share on other sites

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.