GithubHelp home page GithubHelp logo

mwfeedparser's Introduction

MWFeedParser — An RSS and Atom web feed parser for iOS

MWFeedParser is an Objective-C framework for downloading and parsing RSS (1.* and 2.*) and Atom web feeds. It is a very simple and clean implementation that reads the following information from a web feed:

Feed Information

  • Title
  • Link
  • Summary

Feed Items

  • Title
  • Link
  • Author name
  • Date (the date the item was published)
  • Updated date (the date the item was updated, if available)
  • Summary (brief description of item)
  • Content (detailed item content, if available)
  • Enclosures (i.e. podcasts, mp3, pdf, etc)
  • Identifier (an item's guid/id)

If you use MWFeedParser on your iPhone/iPad app then please do let me know, I'd love to check it out :)

Important: This free software is provided under the MIT licence (X11 license) with the addition of the following condition:

This Software cannot be used to archive or collect data such as (but not limited to) that of events, news, experiences and activities, for the purpose of any concept relating to diary/journal keeping.

The full licence can be found at the end of this document.

Demo / Example App

There is an example iPhone application within the project which demonstrates how to use the parser to display the title of a feed, list all of the feed items, and display an item in more detail when tapped.

Setting up the parser

Create parser:

// Create feed parser and pass the URL of the feed
NSURL *feedURL = [NSURL URLWithString:@"http://images.apple.com/main/rss/hotnews/hotnews.rss"];
feedParser = [[MWFeedParser alloc] initWithFeedURL:feedURL];

Set delegate:

// Delegate must conform to `MWFeedParserDelegate`
feedParser.delegate = self;

Set the parsing type. Options are ParseTypeFull, ParseTypeInfoOnly, ParseTypeItemsOnly. Info refers to the information about the feed, such as it's title and description. Items are the individual items or stories.

// Parse the feeds info (title, link) and all feed items
feedParser.feedParseType = ParseTypeFull;

Set whether the parser should connect and download the feed data synchronously or asynchronously. Note, this only affects the download of the feed data, not the parsing operation itself.

// Connection type
feedParser.connectionType = ConnectionTypeSynchronously;

Initiate parsing:

// Begin parsing
[feedParser parse];

The parser will then download and parse the feed. If at any time you wish to stop the parsing, you can call:

// Stop feed download / parsing
[feedParser stopParsing];

The stopParsing method will stop the downloading and parsing of the feed immediately.

Reading the feed data

Once parsing has been initiated, the delegate will receive the feed data as it is parsed.

- (void)feedParserDidStart:(MWFeedParser *)parser; // Called when data has downloaded and parsing has begun
- (void)feedParser:(MWFeedParser *)parser didParseFeedInfo:(MWFeedInfo *)info; // Provides info about the feed
- (void)feedParser:(MWFeedParser *)parser didParseFeedItem:(MWFeedItem *)item; // Provides info about a feed item
- (void)feedParserDidFinish:(MWFeedParser *)parser; // Parsing complete or stopped at any time by `stopParsing`
- (void)feedParser:(MWFeedParser *)parser didFailWithError:(NSError *)error; // Parsing failed

MWFeedInfo and MWFeedItem contains properties (title, link, summary, etc.) that will hold the parsed data. View MWFeedInfo.h and MWFeedItem.h for more information.

Important: There are some occasions where feeds do not contain some information, such as titles, links or summaries. Before using any data, you should check to see if that data exists:

NSString *title = item.title ? item.title : @"[No Title]";
NSString *link = item.link ? item.link : @"[No Link]";
NSString *summary = item.summary ? item.summary : @"[No Summary]";

The method feedParserDidFinish: will only be called when the feed has successfully parsed, or has been stopped by a call to stopParsing. To determine whether the parsing completed successfully, or was stopped, you can call isStopped.

For a usage example, please see RootViewController.m in the demo project.

Available data

Here is a list of the available properties for feed info and item objects:

MWFeedInfo

  • info.title (NSString)
  • info.link (NSString)
  • info.summary (NSString)

MWFeedItem

  • item.title (NSString)
  • item.link (NSString)
  • item.author (NSString)
  • item.date (NSDate)
  • item.updated (NSDate)
  • item.summary (NSString)
  • item.content (NSString)
  • item.enclosures (NSArray of NSDictionary with keys url, type and length)
  • item.identifier (NSString)

Using the data

All properties of MWFeedInfo and MWFeedItem return the raw data as provided by the feed. This content may or may not include HTML and encoded entities. If the content does include HTML, you could display the data within a UIWebView, or you could use the provided NSString category (NSString+HTML) which will allow you to manipulate this HTML content. The methods available for your convenience are:

// Convert HTML to Plain Text
//  - Strips HTML tags & comments, removes extra whitespace and decodes HTML character entities.
- (NSString *)stringByConvertingHTMLToPlainText;

// Decode all HTML entities using GTM.
- (NSString *)stringByDecodingHTMLEntities;

// Encode all HTML entities using GTM.
- (NSString *)stringByEncodingHTMLEntities;

// Minimal unicode encoding will only cover characters from table
// A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters
// which is what you want for a unicode encoded webpage.
- (NSString *)stringByEncodingHTMLEntities:(BOOL)isUnicode;

// Replace newlines with <br /> tags.
- (NSString *)stringWithNewLinesAsBRs;

// Remove newlines and white space from string.
- (NSString *)stringByRemovingNewLinesAndWhitespace;

// Wrap plain URLs in <a href="..." class="linkified">...</a>
//  - Ignores URLs inside tags (any URL beginning with =")
//  - HTTP & HTTPS schemes only
//  - Only works in iOS 4+ as we use NSRegularExpression (returns self if not supported so be careful with NSMutableStrings)
//  - Expression: (?<!=")\b((http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)
//  - Adapted from http://regexlib.com/REDetails.aspx?regexp_id=96
- (NSString *)stringByLinkifyingURLs;

An example of this would be:

// Display item summary which contains HTML as plain text
NSString *plainSummary = [item.summary stringByConvertingHTMLToPlainText];

Debugging problems

If for some reason the parser doesn't seem to be working, try enabling Debug Logging in MWFeedParser.h. This will log error messages to the console and help you diagnose the problem. Error codes and their descriptions can be found at the top of MWFeedParser.h.

Other information

MWFeedParser is not currently thread-safe.

Adding to your project

Method 1: Use CocoaPods

CocoaPods is great. If you are using CocoaPods (and here's how to get started), simply add pod 'MWFeedParser' to your podfile and run pod install. You're good to go! Here's an example podfile:

platform :ios, '7'
    pod 'MWFeedParser'

If you are just interested in using the HTML and/or InternetDateTime categories in your app, you can just specify those in your podfile with pod 'MWFeedParser/NSString+HTML' or pod 'MWFeedParser/NSDate+InternetDateTime'.

Method 2: Including Source Directly Into Your Project

  1. Open MWFeedParser.xcodeproj.
  2. Drag the MWFeedParser & Categories groups into your project, ensuring you check Copy items into destination group's folder.
  3. Import MWFeedParser.h into your source as required.

Outstanding and suggested features

  • Demonstrate the previewing of formatted item summary/content (HTML with images, paragraphs, etc) within a UIWebView in demo app.
  • Provide functionality to list available feeds when given the URL to a webpage with one or more web feeds associated with it.
  • Support for the Media RSS extension (from Flickr, etc.)
  • Support for the GeoRSS extension.
  • Look into web feed icons.
  • Look into supporting/detecting images in feed items.

Feel free to get in touch and suggest/vote for other features.

Licence

Copyright (c) 2010 Michael Waterfall

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

  2. This Software cannot be used to archive or collect data such as (but not limited to) that of events, news, experiences and activities, for the purpose of any concept relating to diary/journal keeping.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mwfeedparser's People

Contributors

mwaterfall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mwfeedparser's Issues

Hey!

Hey Waterfall,

Now the app / framework means that the application is always open in iOS4... Any plans to add a refresh button in there to re gather the data?

Thanks
Dan

Parsing Block main thread

whenever the parser starts parsing, i can scroll my scrollview, seem that it is blocking the main thread. While i keep scrolling before parsing, the parser will no parse until i stop scrolling. Is there anyway to parse the feed in a background thread so it doesn't block the main ui thread?

flickr media tags

sorry. didn't read past issue reports. I'll try to fork the project to try to get the media extensions from flickr.

problem using NSString+HTML

I am trying to decode html entities from a string using your NSString+HTML category. GTMNSString+HTML is also imported.

I am using Xcode 4.3.2 with ios 5.1

Can you help?

-[__NSCFString stringByDecodingHTMLEntities]: unrecognized selector sent to instance 0x6e65a40
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByDecodingHTMLEntities]: unrecognized selector sent to instance 0x6e65a40'

Parse file:// urls

I happened to be getting started with this while offline, and found that file:// urls weren't supported. If you are interested in adding that, here is what I changed around line 161 in MWFeedParser.m. (Note this only works for synchronous connections).

    NSData *data;
    NSError *error = nil;

    if ([@"file" isEqualToString:[[NSURL URLWithString:url] scheme]]) {
        NSString *xml = [NSString stringWithContentsOfURL:[NSURL URLWithString:url] encoding:NSUTF8StringEncoding error:nil];
        data = [xml dataUsingEncoding:NSUTF8StringEncoding];
    } else {
        NSURLResponse *response = nil;
        data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
    }

    if (data && !error) {
        [self startParsingData:data]; // Process
    } else {
        [self failWithErrorCode:MWErrorCodeConnectionFailed description:[NSString stringWithFormat:@"Synchronous connection failed to URL: %@", url]];
        success = NO;
    }

Images in feed HELP please :-)

Hi, please is here anybody, who can give me a code with tutorial how can I add images to my rss feed? Tanks a lot!

Steve

Summary with url with /

If a url in my summary is then disappears the part of the URL after the /.

For example:

twitter.com/username

become

twitter.com

Is there a solution for this?

Is there a way to work without a RootViewController?

I try to implement your great FeeedParser into my Project. I only use ViewController because of my special design. So my question is: how can I use the MWFeedParser without a RootViewController? I looks possible to do all the stuff in a normal tableView but i can't get it.

Best Regards
cutischmidt

Is it possible to get 1st 10 articles of a feed?

I dont want to download all the articles of the feed. The file is too big. I just want to download the 1st 10 and if the user wants more he can click on "Load more" and it will download more.

Parse NSData

Hi,
Is there a way to parse directly NSData? I need to implement my download methods and use MWFeedParser only as a parser.

stopParsing -> parse -> error

Hi

I have an situation where I need to stop parsing and then start parsing again immediately. I will get an error saying: "Cannot start parsing as parsing is already in progress".

It seems that even though you are calling the [delegate feedParserDidFinish] you forget to call [self parsingFinished]. This could be due to some async issues I cannot see.

Please advice,

Martin Lobger

NSString+HTML <p> tag issue

Hi,

Just wondering if you had any ideas...

Basically, I'm parsing the item.content into a textfield (to give me complete control over the formatting of the text) and it works really well.

The only issue is that when I convert html to plain text, I lose the

tags and so there are no newlines. It appears that the feeds I am parsing do not use
tags!

I just wondered if you (or anybody else) had found a way to detect new paragraphs in the html and then keep them when the html is converted into plain text!

Many thanks in advance!

Feed item content is moved to summary

When an atom feed item has content but no summary, the content is moved to the summary property of MWFeedItem. According to http://www.ietf.org/rfc/rfc4287, it's perfectly legal for an item to have content and no summary. Moving the content to the summary property can cause confusion.

A better solution may be to just leave the summary empty and keep the content in the Content property of MWFeedItem.

Caching

Hello!

I was just wondering if you could implement caching, or give out a few hints on how to approach it, because I'm having trouble getting it to work... I attempted to implement caching the parsedItems, using the EGOCache (https://github.com/enormego/EGOCache) classes but to no avail... thanks in advance!

Quick not thread-safe question?

Hello,
I noticed in the README that you mentioned that the parser is not thread-safe. I'm guessing this means that two threads can't access the same parser instance at the same time. My question: do you think its safe to have two parallel threads each with their own instance of the parser working simultaneously? Or would this also not be thread-safe?

Thanks again and especially for such a great open-sourced component.

Some RSS feed without pubDate or even without updated.

HI, I find some rss feed, e.g. http://noc.leaseweb.com/rss/maintenance.php They mark the time stamp in the description. I really have no idea how to fix that, cause I try to save the articles into database and show them again. If there is not correct time stamp, it is really hard to order them or decided which articles I have saved when user refresh the feed. I know guid is a way, but sounds also complex, how do you think about that?
Btw. Good job, thx for the codes. My project is not yet release, when it release, I will note you.

Memory leaks in FeedParser didEndElement

According to Instruments, there are memory leaks here,
Within - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName

(around line 608)
// Remove newlines and whitespace from currentText
NSString *processedText = [currentText stringByRemovingNewLinesAndWhitespace];

(around line 622)
else if ([currentPath isEqualToString:@"/rss/channel/item/pubDate"]) { if (processedText.length > 0) item.date = [NSDate dateFromInternetDateTimeString:processedText formatHint:DateFormatHintRFC822]; processed = YES; }

(around line 692)
// Dispatch item to delegate
[self dispatchFeedItemToDelegate];

I've been trying to understand them but no luck so far.

GTMNSString+HTML I can't add class method!!

I want do mod this file to do something else. In GTMNSString+HTML.h I add this code:

  • (NSString *)getFirstImage;
    in GTMNSString+HTML.m I add the implementation:

  • (NSString *)getFirstImage {
    //Do something

    return url;
    

    }

}
I use this with this code:

NSString *url = [item.summary getFirstImage];
But I received this warning,

422:21:{422:21-422:49}: warning: instance method '-getFirstImage' not found (return type defaults to 'id') [3]
Also in MWFeedItem.h I added

NSString *image;

@Property (nonatomic, copy) NSString *image;
And than in the implementation I added the @synthesize image; but when I try to use it with

MWFeedItem *item =[reader.feedItems objectAtIndex:index];
item.image
i can't use it! why this?

data argument not used by format string

Hey @mwaterfall,

noticed this bit of code doesn't use the data argument anywhere in the string or format being appended.
Should it just be pulled out? or is there something else that is to be accomplished?

if (ELEMENT_IS_EMPTY(elementName)) {
    [currentText appendFormat:@" />", elementName];
} else {
    [currentText appendFormat:@">", elementName];
}

Lengthened Summary

I've been trying to extend the summary description on the parser so that it will include the entire article. Do you guys have any suggestions as to how to do this?

Thanks!

Incorrect text encoding with feeds containing "euc-kr" text encoding

Hello,
I had issues with some specific text encoding when the http headers were not indicating the text encoding (like this one for example : http://www.torrentrg.com/bbs/rss.php?bo_table=torrent_variety ).
To fix this, I decided to get the encoding type from the XML declaration if we don't get it from http headers :

<?xml version="1.0" encoding="euc-kr"?>

If you want to check about this, here is my code ... in MWFeedParser.m / - (void)startParsingData:(NSData *)data textEncodingName:(NSString *)textEncodingName :

        [...]
        // Not UTF-8 so convert
        MWLog(@"MWFeedParser: XML document was not UTF-8 so we're converting it");
        NSString *string = nil;

        // Attempt to detect encoding from response header
        NSStringEncoding nsEncoding = 0;
        [...]

becomes :

        [...]
        // Not UTF-8 so convert
        MWLog(@"MWFeedParser: XML document was not UTF-8 so we're converting it");
        NSString *string = nil;

        // If no text encoding indication was in the response header
        // then try to get encoding from the XML declaration
        if (textEncodingName == nil) {
            NSData* xmlEncodingData = [NSData dataWithBytesNoCopy:(void *)[data bytes]
                                                           length:100
                                                     freeWhenDone:NO];
            NSString* xmlEncodingString = [[NSString alloc] initWithData:xmlEncodingData encoding:NSUTF8StringEncoding];
            if (!xmlEncodingString) xmlEncodingString = [[NSString alloc] initWithData:xmlEncodingData encoding:NSISOLatin1StringEncoding];
            if (!xmlEncodingString) xmlEncodingString = [[NSString alloc] initWithData:xmlEncodingData encoding:NSMacOSRomanStringEncoding];

            if ([xmlEncodingString hasPrefix:@"<?xml"]) {
                NSRange a = [xmlEncodingString rangeOfString:@"?>"];
                if (a.location != NSNotFound) {
                    NSString *xmlDec = [xmlEncodingString substringToIndex:a.location];
                    NSRange b = [xmlDec rangeOfString:@"encoding=\""];
                    if (b.location != NSNotFound) {
                        NSUInteger s = b.location+b.length;
                        NSRange c = [xmlDec rangeOfString:@"\"" options:0 range:NSMakeRange(s, [xmlDec length] - s)];
                        if (c.location != NSNotFound) {
                            textEncodingName = [xmlEncodingString substringWithRange:NSMakeRange(b.location+b.length,c.location-b.location-b.length)];
                        }
                    }
                }
            }
            [xmlEncodingString release];
        }

        // Attempt to detect encoding from response header or XML declaration
        NSStringEncoding nsEncoding = 0;
        [...]

Thread-unsafety in NSDate+InternetDateTime.m

NSDateFormatter is not threadsafe.

This causes MWFeedParser to crash when parsing dozens of feeds in parallel.

Adding

@synchronized(dateFormatter) {
    …
}

to both, dateFromRFC822String: and dateFromRFC3339String: fixed it.

But then again a static NSDateFormatter was probably chosen to be used in order to improve performance, which the @synchronized(){…} locks kind of destroy. Using non-static temporary NSDateFormatter instances would probably be a better choice.

NSMutableRequest cache policy seems overly restrictive.

I've got an application where I'd like to have the ability to view the RSS feed content offline but as I look into how the feed URL is pulled in, basically all caching capabilities specified by the client are wiped out.

The following definition ought not to be the default, in my opinion but should be left at the default cache policy NSURLRequestUseProtocolCachePolicy from here.

Option 1
Utilize an additional init parameter to send in the NSURLRequestCachePolicy value.

Option 2
Or possibly the NSURLRequest ought to just come in on the init method so that more of the request can be modified and the init would accept an NSMutableRequest instead of just an NSRequest.

Current Code in MWFeedParser.m

    // Request
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url
                                                  cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData 
                                              timeoutInterval:60];

For some background on the iOS caching dilemma you might check out this article - http://blackpixel.com/blog/2012/05/caching-and-nsurlconnection.html

If either of these options sounds good, I'll go ahead and implement either one, probably Option 2 ultimately for ongoing flexibility.

Parser spends a lot of time in [NSString stringByRemovingNewLinesAndWhitespace]

I have noticed a performance bottleneck. When parsing a large RSS feed such as the itunes 300 new releases () it can spend 60% of the total parsing time in [NSString stringByRemovingNewLinesAndWhitespace].

The entire parsing operation (not including downloading of data from the server) can take 3900ms, and roughly 2200ms of that can be in stringByRemovingNewLinesAndWhitespace.

These figures where taken when testing on a release build on an iPhone 3GS using the MWFeedParser sample code and the following RSS feed:

http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wpa/MRSS/newreleases/limit=300/rss.xml

[Note: is this stripping of white space needed? Could it be made an optional feature to save CPU time?]

stringByEncodingXMLEntities returns wrong values

I realize that "NSString+XMLEntities" is depreciated (replaced by "NSString+HTML").

However, "NSString+HTML" stringByEncodingHTMLEntities is not suitable for encoding entities for use in XML. The reason is that XML apparently only permits these 5 keyword mapped entities:

{ @"&quot;", 34 },
{ @"&amp;", 38 },
{ @"&apos;", 39 },
{ @"&lt;", 60 },
{ @"&gt;", 62 },

For XML, all other entities must apparently be mapped to the appropriate &#xxx; value. Example character: Ø. The &Oslash needs to instead be &#216 or other XML parsers barf.

Do you know of a quick workaround? Thanks!

Problem converting some HTML codes

Hi!

I'm using in a project your NSString+XMLEntities class but I'm having trouble in some conversions. For instance this text block (first line is before and second is after):

"de tama&ntilde;os variados, que permitir&aacute;n dise&ntilde;ar los distintos itinerarios."
"de tamaÑos variados, que permitirÁn diseÑar los distintos itinerarios."

It's converting the codes to the upper case version of that letter. It should be:
"de tamaños variados, que permitirán diseñar los distintos itinerarios."

Any Idea why? Thank you!

Memory leak in parser

Hello, there seems to be a memory leak in the parser:

MWFeedParser.m
line 330:
self.item = [[MWFeedItem alloc] init];
should be:
self.item = [[[MWFeedItem alloc] init] autorelease];

because both "alloc" and the "item" property (which has auto retain) retain the object...
in the end, it doesn't get freed with the single release in dealloc (or so it seems).

Thanks

Podcast Isse

Hi,

I cannot even begin to thank you for all the help your code has given me! I've extracted the URL of images and displayed them in the tableview, put them in a fancy detail view and I'm really pleased with the result!

The final element I'm having issues with is getting the URL of enclosures such as a podcast.

I know you don't have time to help in detail with individual issues but I was hoping you could just explain how I can extract it!

Many thanks in advance!

Parsing of guid/id?

Hej,

Any plans to add the parsing of the guid / id tag in MWFeedParser?

Oli

Caching?

Wondering if there's anyway of caching the info from the feed. Thanks to iOS 4.0 it stays there for a bit, but disappears after a bit.

wrong conversion of html tag

Hi,

one of my html string has &#176 which is equal to degree symbol. But it give me infinite symbol.
even &#160 returns me crucifix signs

Images

Hi,

This isn't really an issue - more of a plea for help! I apologise if it's in the wrong section, I'm really new to this.

Basically, I was wondering how to add a "Refresh" button and whether or not it is possible to include images from the feeds?

Any help would be greatly appreciated!

xCode 4.5 and iOS6 - no suck file or directory libMWFeedParser.a

clang: error: no such file or directory: '/Users/unicondor/Library/Developer/Xcode/DerivedData/DingUnisannio-czbgknwdwtdvjzfalsaqpvwuqqul/Build/Products/Debug-iphoneos/libMWFeedParser.a'

Only when i try to compile my project on my device... If i run it on the simulator, he work fine...

Parsing Media RSS

Hi,
first of all I would give you my best congratulations for this project...it works great!! :)
I'm writing because I would like to implement a Yahoo Media RSS parsing: because I'm a very newbie of Objective-C in general, my question is what is/are the method(s) that I have to modify (or implement from scratch) for this purpose and if you can write some lines of codes as example!
Thank you very much in advance.

Add class attribute to MWFeedItem

Hi! Thanks for your project!
I love it and i use it in my app. Now I need to add one class attribute in MWFeedItem. But when I create an object of this type, I can't access to the attribute that I create before. I can't understand why!
Can you help me? Thanks

This class removing my numeric letters from the webservice records

Hello, i'm using your classes to remove my html tags from an NSString. Its working fine. But, its removing my letter 2 particularly alone. I don't know why its happend? Please find my records below

Parsed

ออกอากาศวันที่ 2 เมษายน 2556

Raw

\u0e2d\u0e2d\u0e01\u0e2d\u0e32\u0e01\u0e32\u0e28\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 2 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 2556

&

My String

\r\n\tCheeze FM 107.4 Today's hot music คลื่นวิทยุเพลงฮิตในจังสระบุรี คลื่นนี้มีแต่เพลงฮิตติดCheezeeee\r\n

When i try to replace this using stringByConvertingHTMLToPlainText like below

NSString *shortD = [[[webServiceRecords objectAtIndex:indexPath.row] objectForKey:@"shortDesc"] stringByConvertingHTMLToPlainText];

Result - "Cheeze FM 07.4 Today's hot music คลื่นวิทยุเพลงฮิตในจังสระบุรี คลื่นนี้มีแต่เพลงฮิตติดCheezeeee" // 1 is missing

Its removing some numeric letters always. What may be the reason? And, how do i fix this?

My files - https://dl.dropboxusercontent.com/u/69670844/Nsstring%2BHTML.zip

[NSString+HTML] Parse to uchar value rather than escapeSequence

Hi,

I'm trying to use the NSString+HTML category and sometimes I see the string is being parse using escapeSequence instead of uchar value (i.e. " instead of "). Is there any reason for this?

I'm asking because the library I'm using (Three20) does not work with the string parsed by escapeSequence value but it works great with uchar value.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.