forked from nolanw/HTMLReader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLDocument.h
More file actions
48 lines (40 loc) · 1.34 KB
/
HTMLDocument.h
File metadata and controls
48 lines (40 loc) · 1.34 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
42
43
44
45
46
47
48
// HTMLDocument.h
//
// Public domain. https://github.com/nolanw/HTMLReader
#import <Foundation/Foundation.h>
#import "HTMLDocumentType.h"
#import "HTMLElement.h"
#import "HTMLNode.h"
#import "HTMLQuirksMode.h"
#import "HTMLSupport.h"
/**
* An HTMLDocument is the root of a tree of nodes representing parsed HTML.
*
* For more information, see http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#writing
*/
@interface HTMLDocument : HTMLNode
/**
* Parses an HTML string into a document.
*/
+ (instancetype)documentWithString:(NSString *)string;
/**
* Initializes a document with a string of HTML.
*/
- (instancetype)initWithString:(NSString *)string;
/**
* The document type node.
*
* The setter replaces the existing documentType, if there is one; otherwise, the new documentType will be placed immediately before the rootElement, if there is one; otherwise the new documentType is added as the last child.
*/
@property (strong, nonatomic) HTMLDocumentType *documentType;
/**
* The document's quirks mode.
*/
@property (assign, nonatomic) HTMLQuirksMode quirksMode;
/**
* The first element in tree order. Typically the `<html>` element.
*
* The setter replaces the existing rootElement, if there is one; otherwise, the new rootElement is added as the last child.
*/
@property (strong, nonatomic) HTMLElement *rootElement;
@end