title: output xml file with media group attribute
body: <p>I'm using simpleXML in my php application.</p>
  
  <p>I need to wrap my media elements with 'media group'.
  Here is the xml output so far:</p>
  
  <pre><code>...
  &lt;item&gt;
  &lt;title&gt;02:15&lt;/title&gt;
  &lt;link&gt;http://www.realcardio.com&lt;/link&gt;
  &lt;description&gt;Workout with Hugo to get bigger biceps&lt;/description&gt;
  &lt;pubDate&gt;08/14/2012&lt;/pubDate&gt;
  &lt;media:credit role="author"&gt;workout title goes here&lt;/media:credit&gt;
  &lt;media:content url="http://youtu.be/21EpHRJTT34"/&gt;
  &lt;media:thumbnail url="http://img.youtube.com/vi/21EpHRJTT34/1.jpg"/&gt;
  &lt;jwplayer:start&gt;150&lt;/jwplayer:start&gt;
  &lt;jwplayer:duration&gt;285&lt;/jwplayer:duration&gt;
  &lt;jwplayer:backcolor&gt;#FFCC00&lt;/jwplayer:backcolor&gt;
  &lt;jwplayer:message&gt;This is a test message to display to the user&lt;/jwplayer:message&gt;
  &lt;jwplayer:routineID&gt;26&lt;/jwplayer:routineID&gt;
  &lt;/item&gt;
  ...
  </code></pre>
  
  <p>I simply need to group the media elements like so:</p>
  
  <pre><code>&lt;media:group&gt;
     &lt;media:credit role="author"&gt;workout title goes here&lt;/media:credit&gt;
     &lt;media:content url="http://youtu.be/21EpHRJTT34"/&gt;
     &lt;media:thumbnail url="http://img.youtube.com/vi/21EpHRJTT34/1.jpg"/&gt;
  &lt;/media:group&gt;
  </code></pre>
  
  <p>and here is the code I am using to create the xml file thus far:</p>
  
  <pre><code>...
  $item = $channel-&gt;addChild( 'item' );
  $item-&gt;addChild( 'title', $minsandsecs );
  $item-&gt;addChild( 'link', 'http://www.realcardio.com' );
  $item-&gt;addChild( 'description', $viddesc );
  $item-&gt;addChild( 'pubDate', '08/14/2012' );
  
  $mediaCredit = $item-&gt;addChild( 'credit', 'workout title goes here','http://search.yahoo.com/mrss/' );
  $mediaCredit-&gt;addAttribute( 'role', 'author' );
  
  $mediaContent = $item-&gt;addChild( 'content', '', 'http://search.yahoo.com/mrss/' );
  $mediaContent-&gt;addAttribute( 'url', $vidsource );
  
  $mediaThumbnail = $item-&gt;addChild( 'thumbnail', '', 'http://search.yahoo.com/mrss/' );
  $mediaThumbnail-&gt;addAttribute( 'url', $imgloc );
  
  $item-&gt;addChild( 'start',$vidstart, 'http://developer.longtailvideo.com/trac/wiki/FlashFormats' );
  $item-&gt;addChild( 'duration',$viddur, 'http://developer.longtailvideo.com/trac/wiki/FlashFormats' );
  $item-&gt;addChild( 'backcolor',$vidbackcolor, 'http://developer.longtailvideo.com/trac/wiki/FlashFormats' );
  $item-&gt;addChild( 'message', $vidmessage, 'http://developer.longtailvideo.com/trac/wiki/FlashFormats' );
  $item-&gt;addChild( 'routineID', $routineID, 'http://developer.longtailvideo.com/trac/wiki/FlashFormats' );
  ...
  </code></pre>
  
  <p>I'm sure it's something simple that I am overlooking.
  Thanks!</p>