Hi all,

I'm trying to parse the xml file that's returned by youtube. In it are
the following lines:
<entry>
  <id>...</id>
  ....
  ....
  <media:group>
      <media:title type="plain">some title</media:title>
      <media:player url="someurl"/>
      <media:thumbnail url="2.jpg"
      height="97" width="130" time="00:00:03.500"/>
    <media:thumbnail url="1.jpg"
      height="97" width="130" time="00:00:01.750"/>
    <media:thumbnail url="3.jpg"
      height="97" width="130" time="00:00:05.250"/>
    <media:thumbnail url="0.jpg"
      height="240" width="320" time="00:00:03.500"/>
  </media:group>
</entry>


Here is my code:

$(document).ready(function(){

                $.get("engine.php", '', function(xmldata){ // engine.php 
outputs the
above
                        $("entry", xmldata).each(function(eachmsg) {
                                $thisentry = $(this);
                                $title = $("title", $thisentry).text();

so far it's working fine, but how do i get the contents of media:title
and each of the media:thumbnail entries?

This doesn't work:
$content = $("media:title", $thisentry).text();

Thanks!

Eric

Reply via email to