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