Initial import.

This commit is contained in:
Brent Simmons
2016-12-26 16:20:42 -08:00
parent d33fd2b14e
commit 051787ee7f
67 changed files with 14474 additions and 0 deletions

31
RSXML/RSHTMLLinkParser.h Normal file
View File

@@ -0,0 +1,31 @@
//
// RSHTMLLinkParser.h
// RSXML
//
// Created by Brent Simmons on 8/7/16.
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//
@import Foundation;
/*Returns all <a href="some_url">some_text</a> as RSHTMLLink object array.*/
@class RSXMLData;
@class RSHTMLLink;
@interface RSHTMLLinkParser : NSObject
+ (NSArray <RSHTMLLink *> *)htmlLinksWithData:(RSXMLData *)xmlData;
@end
@interface RSHTMLLink : NSObject
// Any of these, even urlString, may be nil, because HTML can be bad.
@property (nonatomic, readonly) NSString *urlString; //absolute
@property (nonatomic, readonly) NSString *text;
@property (nonatomic, readonly) NSString *title; //title attribute inside anchor tag
@end