1
  <items>
  <item>
  <pastor> Master Jojimon</pastor>  
   <video>
   youtube.com/embed/X_nJ7So9y04 
  </video>
  <name>Message by Master Jojimon</name>
    <lan>english</lan>

I want to retrieve video url and display in tableview ,and I want to play this video url, I use webView now my youtube videos working rest are not working , any one Please help me! my full program codes How to play a video url from server in an iPhone app

Community
  • 1
  • 1
islahul
  • 194
  • 1
  • 11
  • I will recomend [TBXML Parser](http://www.tbxml.co.uk/TBXML/TBXML_Free.html) which is easy and good in terms of [performance](http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project). Here is its [Guide](http://www.tbxml.co.uk/TBXML/Guides.html). – Inder Kumar Rathore Jun 23 '12 at 06:48
  • Check this Tutorial : [Parsing XML Files](http://www.iphonesdkarticles.com/2008/12/parsing-xml-files.html) [Example Code](http://sites.google.com/site/iphonesdktutorials/sourcecode/XML.zip) – Mani Jun 23 '12 at 06:26
  • Thank you, Now i need display the name content on tableViewCell , when click corresponding row then play video ,please write the code – islahul Jun 23 '12 at 06:48
  • Hi, i post all my codes in this link ,how to play a video url from server in an iPhone app – islahul Jun 23 '12 at 07:12
  • http://stackoverflow.com/questions/1779511/play-youtube-videos-with-mpmovieplayercontroller-instead-of-uiwebview http://stackoverflow.com/questions/5818585/how-can-i-play-a-youtube-video-in-an-iphone – Mani Jun 23 '12 at 07:14
  • and example is "play youtube video in ios" : https://nodeload.github.com/ThinkChris/YouTubeDemo/zipball/master – Mani Jun 23 '12 at 07:17

2 Answers2

0

You can use xml parser to parse the xml to store in to custom objects or data types like NSArray, NSDictionary etc.

Check out NSXMLParser tutorials from this thread - https://stackoverflow.com/questions/6116827/looking-for-a-good-tutorial-on-nsxmlparser

Community
  • 1
  • 1
rishi
  • 11,482
  • 4
  • 38
  • 58
0

just parse your xml content using headers if you have multiple values for the headers, then do something like

 for(int i=0;i<[xmlArray count];i++)
    {
        NSDictionary *dict=[xmlArray objectAtIndex:i];
       [pastorArray addObject:[dict valueForKey:@"pastor"]];
       [videoURLArray addObject:[dict valueForKey:@"video"]];
       [nsmeArray addObject:[dict valueForKey:@"name"]];
       [lanArray addObject:[dict valueForKey:@"lan"]];
    }

//now u can print the array values one by one

Neeraj Neeru
  • 580
  • 8
  • 28