forked from nolanw/HTMLReader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLParser.h
More file actions
41 lines (34 loc) · 1.19 KB
/
HTMLParser.h
File metadata and controls
41 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// HTMLParser.h
//
// Public domain. https://github.com/nolanw/HTMLReader
#import <Foundation/Foundation.h>
#import "HTMLDocument.h"
#import "HTMLElement.h"
/**
* An HTMLParser turns a string into an HTMLDocument.
*
* For more information, see http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html
*
* @see HTMLTokenizer
*/
@interface HTMLParser : NSObject
/**
* @param string A string of HTML.
* @param context A context element used for parsing a fragment of HTML, or nil if the fragment parsing algorithm is not to be used.
*
* For more information on the context parameter, see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#parsing-html-fragments
*/
- (instancetype)initWithString:(NSString *)string context:(HTMLElement *)context NS_DESIGNATED_INITIALIZER;
/**
* The HTML being parsed.
*/
@property (readonly, copy, nonatomic) NSString *string;
/**
* Instances of NSString representing the errors encountered while parsing the document.
*/
@property (readonly, copy, nonatomic) NSArray *errors;
/**
* The parsed document. Lazily created on first access.
*/
@property (readonly, strong, nonatomic) HTMLDocument *document;
@end