title: How to parse this <media:thumbnail url=""> using PHP
body: <p><strong>I am  not able to parse this type of code:</strong></p>
  
  <pre><code>&lt;media:thumbnail url="http://images.indianexpress.com/2015/07/man-u-reuters_t.jpg?w=450" /&gt;         &lt;media:content url="http://images.indianexpress.com/2015/07/man-u-reuters_t.jpg?w=450" medium="image"&gt;
  </code></pre>
  
  <p>When I am using this code,</p>
  
  <pre><code>&lt;?php
      $html = "";
  
      $xml = simplexml_load_file("sports.xml");
  
      foreach ($xml-&gt;channel-&gt;item as $news)
      {
          // echo $news-&gt;title;
          $ns_media = $news-&gt;children("http://search.yahoo.com/mrss/");
  
          echo $ns_media-&gt;content-&gt;title . "&lt;br/&gt;"; // Displays "&lt;media:content&gt;"
      }
  </code></pre>
  
  <p><strong>I am getting output as:</strong></p>
  
  <pre><code>Man-u-reuters_t
  IanBellReuters-T
  dutee-body2
  Dutee-T
  duleeptrophy-T
  EnglandReuters-T
  AzharAliAP-T
  PakistanAP-T
  AndersonReuters-T
  KarunNairFile-T
  ViratKohliPTI-T
  kaneriaIEFile-M
  PlatiniAP-T
  asheslives
  IndiaAustraliaT
  ChelseaBarcelonaAPT
  BradHaddinReutersT
  ankeet-t
  Arcehry-T
  SardarSinghT
  DuteeChandFB-T
  CliveRice-T
  ChrisRogersAP-T
  ClarkeReuters-T
  AlastairCookReuters-T
  GangulyReuters-T
  SachinTendulkarPTI-T
  GangulyPTI-T
  CliveRiceAP-T
  ArcheryIEfile-T
  PujaraPTIT
  AshtonAgarTPTI
  PeterNevillReuters-T
  APJAbdulKalamT
  IanBellReutersT
  ChrisRogersAPT
  hockey-small
  dutee-chand-mi
  DuteeChandT
  mathew-small
  ViratKohliPTIT
  Sushil-Kumar-feat
  Pro-Wrestling-League-feat
  AnuragThakurT
  SSreesanthPTIT
  LalitModiT
  Anirban-Lahiri-f
  India-hockey-f
  srk_express-file_t
  Chris-Gayle-f
  Viru_pti_t
  Sergio-Romero_reuters_t
  SachinPTI-T
  SREESANTH_PTI_T
  SSreesanthPTI-T
  Srinivasan-T
  TourdeFranceReuters-T
  SriLankaReuters-T
  cricket
  SreesanthPTI-T
  VettelReuters-T
  WarneReuters-T
  MarkWoodReuters-T
  Misbah-ul-Haq-F
  S-Sreesanth-f
  yUVRAJ-_PTI_T
  Sreesanth-f
  abd_facebook_t
  Yuvraj-Singh-f
  Stuart-Broad-m
  Chris-Rogers-f
  Manchester-_reuters_t
  kabaddi-thumb
  Oltmans-T
  ajit-thumb
  sreesanth-thumb
  Paul-Van-Ass_t
  sreesanth1-thumb
  Sreesanth_pti_t
  Rahul-Dravid_pti_t
  Amit-Mishra_pti-t
  Lewis-Hamilton-F
  Roelant-Oltman-MM
  S-Sreesanth-f
  bcci-thumb
  Sourav-Ganguly_pti_t
  SreesanthFileT
  Bangladesh-f
  Lewis-Hamilton-f
  Sreesanth
  Pakistan-f
  Dale-Steyn_twitter_t
  Usain-Bolt-f
  Dhoni-f
  Gayle_reuters_t
  Usain-usa_t
  Kohli-m
  golf-thumb
  Hockey-thumb
  BCCI-thumb
  felix-thumb
  Didier-Drogba-f
  VijenderSinghPTIT
  RonaldoReutersT
  Van-Ass-f
  PragyanOjhaLT
  SergioPerezAPT
  IndiahockeyT
  Saina-Nehwal-feat
  MariaSharapovaT
  Chung-Mong-joon-feat
  Afganistan-feat
  Bangladesh-feat
  ShoaibSaniaLT
  SureshRainaAPT
  jaglan-480
  mishra-thumb
  oltmans-thumb
  England-team-feat
  Ojha-t
  D-Steyn-main
  AxarPatelT
  BCCI-feat
  Anurag-Thakur_t
  SureshRainaT
  Usain-Bolt-feat
  MSDHoniT
  ViratKohliPTIT
  AmitMishraT
  Anurag-Thakur-feat
  ViratKohliFileTt
  TamimIqbalAPT
  ViratKohliT
  raviICC-T
  YurajSingh-T
  ABdevilliers-T
  BangladeshAP-t
  DhoniAP-T
  ShehzadReuters-T
  ViratKohli-T
  RahulPujaraBCCI-T
  dhyan
  YounisAP-T
  Sangram-Singh-feat
  ISl-feat
  MahmudullahAP-T
  Virat-Kohli_pti_m
  Usain-Bolt-feat
  Salman-Khan-feat
  Yasir-Shah-feat
  VVS-laxman_pti_t
  Ashwin_facebook_t
  Patil_pti_t
  Virat-Kohli-ap-t
  Sania-Mirza_facebook_t
  Bairstow-ap-t
  bcci-thumb
  Virbhadra-Singh-thumb
  MohitChhillar
  VikasKrishan-T
  yuri-small
  IndiaHockeyVanAssPTIT
  Sarfaraz-T
  Cricket-T
  Kevin-Pietersen_AP_2-M
  SterlingReuters-T
  JonnyBairstowReuters-T
  Matthew-Wade-feat
  BianchifuneralReuters-T
  LehmannReuters-T
  Praful-Patel-feat
  mustafizurAP-T
  Cheteshwar-Pujara--feat
  Varun-Aaron-feat
  Pele-feat
  EdenGardensFileT
  mickfanningT
  RahulDravidT
  SachinTendulkarWarneT
  Jeffrey-WebbAPT
  ChrisRogersReutersT
  ZachJohnsonReutersT
  ZachJohnsonReuters-T
  JKCA
  AnuragThakurPTLT
  Paltan-T
  Van-Ass_t
  hockey
  YounisKhanAP-T
  RahulDravidPTI-T
  UsmanAP-T
  FIFAReuters-T
  BlatterReuters-T
  SaniaMirzaPTI-T
  Harbhajan_singh_reuters_t
  Central-Zone-feat
  Rajiv-Shukla-feat
  Paul-Van-Ass_t
  Ganguly_pti_t
  Sri-Lanka-Riots
  </code></pre>
  
  <p>I am not able to parse the &lt;media:content url="">.</p>
  
  <p>Stack Overflow question <em><a href="https://stackoverflow.com/questions/11648401/how-to-get-mediacontent-with-simplexml">How to get media:content with SimpleXML</a></em> is not working.</p>