youtube xml parser for iphone - iphone

I am working on iphone application which will read the following youtube page source:
view-source:http://www.youtube.com/user/danielmorcombefd
and then save the links of all the videos available on any particular youtube channel like the href node of the line below:
<h4><a class="title" href="/watch?v=ouMPBbZ2vKw&context=C2ab41ADOEgsToPDskJnhTjKl70yDQdEkLJb0So8" dir="ltr">
Can anybody suggest a source code link for youtube xml reader. Solutions are appreciate in advance

Alternate
You can also use the JSON format. You can add ?alt=json to the URL to get the JSON version of it. Then you can use JSON library. JSON library

Related

How to solve iPhone app hpple HTML Parsing 'libxml/tree.h' file not found?

I am trying to parse HTML URL content using hpple for iPhone app. I want to parse and get data from like this URL http://www.example.com/mobile/403.html. I have used Google and found hpple for HTML parsing. I got the sample HTML parsing hpple code from github. When i start to run the project the below error is occurring
'libxml/tree.h' file not found
I have added this line ${SDKROOT}/usr/include/libxml2 in project->build->header search paths but not it is looking like this iPhoneos3.1.2/usr/include/libxml2/** and also i have included libxml2.dylib and libxml2.2.dylib in my project. Am working in XCode 4.2. Could you please help to solve this error? Thanks in advance.
Make sure you add this line:
${SDKROOT}/usr/include/libxml2
in TARGETS->build->header search paths...
and make sure that you copied your hpple files into your project like this...
Good luck and hope this helps!

how to create XML Doc in ios

in my current project i need to create one xml file and send it to server.
i searched many sites a got information about some API like
NSXML (now its deprecated)
http://onlinefreecomputertutorials.blogspot.in/2011/07/how-to-read-and-write-xml-documents.html
GDATAXML (now its deprecated)
http://www.raywenderlich.com/725/how-to-read-and-write-xml-documents-with-gdataxml
please if is there any API i can use to create xml or you have any idea just share with me or any link for tutorial to create xml in objective c.
thanks for any help.
Use TCMXMLWriter. It's a small XML library with a very nice syntax.

How to add an rss feed to an iphone app that isn't in xml format

I am trying to get an rss feed into my iphone app.
I was following this tutorial:
http://cocoadevblog.com/iphone-tutorial-creating-a-rss-feed-reader
and it works for a feed in xml format but im trying to get this feed in feed://www.clontarfrugby.com/feed/
and it keeps giving me the error
Unable to download xml data (error code 1002)
I have been looking online for ways to import a rss feed thats not in xml format but i cant find anything.
Does anyone know how to change what ive done in the tutorial so i can import the right feed? or does anyone know of any tutorials that could help me out?
That is an XML feed (RSS is always XML).
Your issue is likely that "feed://" isn't a real URL, even if Safari handles it. Change it to "http://" and it'll probably work fine.

iPhone: XML Parsing Problem?

I have some XML that looks like the following sample:
<INLINE>
<IMG LINKTEXT="خدمات ديني يقيني" NUMOFCOLOUMNS="9" NUMOFROWS="20">RamadanPortal</IMG>
</INLINE>
When I tried to parse the above XML using NSXMLParser, I'm getting the LINKTEXT response as U062e\U062f.
How can I get the exact Arabic text instead of Unicode characters? Thanks in advance.
You need to download the file in the correct encoding. There's plenty of documentation on this on the apple website (developer docs), but since you haven't supplied a code example I can't point you at the exact one.

iPhone: random "image of the day" type service?

The iPhone makes it really simple to snarf down an image from the web; you can turn a URL into a UIImage in one line of code. So I'd like to enable my app (an educational puzzle game... my first!) to download some random images to make it more interesting and dynamic.
I thought about using Kodak's image of the day RSS feed, but I'm having quite a time figuring out how to parse it. Rather than being a simple list of image URLs, it seems to reference a bunch of "jhtml" URLs, which run Javascript to display the images in your RSS reader. Is this intentionally obfuscated, or am I missing some basic step to parse this?
I also tried the Astronomy Picture of the Day, via this RSS feed, but it's just the original page's HTML stuffed into CDATA... ugh.
So I guess this is really two questions:
Is there a simple way to parse these feeds to actually get at the JPG URLs on the iPhone?
Is there a better source for "picture of the day" type images?
PS: I'm using NSXMLParser, which I learned to use here.
I would recommend going with something that has an API, perhaps the Flickr "Interestingness" feed:
http://www.flickr.com/services/api/flickr.interestingness.getList.html
There is an objective-C library written to help with accessing Flickr but not sure if this API call is included:
http://github.com/lukhnos/objectiveflickr/tree/master