DDXMLDocument.h
2.77 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#import <Foundation/Foundation.h>
#import "DDXMLElement.h"
#import "DDXMLNode.h"
/**
* Welcome to KissXML.
*
* The project page has documentation if you have questions.
* https://github.com/robbiehanson/KissXML
*
* If you're new to the project you may wish to read the "Getting Started" wiki.
* https://github.com/robbiehanson/KissXML/wiki/GettingStarted
*
* KissXML provides a drop-in replacement for Apple's NSXML class cluster.
* The goal is to get the exact same behavior as the NSXML classes.
*
* For API Reference, see Apple's excellent documentation,
* either via Xcode's Mac OS X documentation, or via the web:
*
* https://github.com/robbiehanson/KissXML/wiki/Reference
**/
enum {
DDXMLDocumentXMLKind = 0,
DDXMLDocumentXHTMLKind,
DDXMLDocumentHTMLKind,
DDXMLDocumentTextKind
};
typedef NSUInteger DDXMLDocumentContentKind;
NS_ASSUME_NONNULL_BEGIN
@interface DDXMLDocument : DDXMLNode
{
}
- (nullable instancetype)initWithXMLString:(NSString *)string options:(NSUInteger)mask error:(NSError **)error;
//- (instancetype)initWithContentsOfURL:(NSURL *)url options:(NSUInteger)mask error:(NSError **)error;
- (nullable instancetype)initWithData:(NSData *)data options:(NSUInteger)mask error:(NSError **)error;
//- (instancetype)initWithRootElement:(DDXMLElement *)element;
//+ (Class)replacementClassForClass:(Class)cls;
//- (void)setCharacterEncoding:(NSString *)encoding; //primitive
//- (NSString *)characterEncoding; //primitive
//- (void)setVersion:(NSString *)version;
//- (NSString *)version;
//- (void)setStandalone:(BOOL)standalone;
//- (BOOL)isStandalone;
//- (void)setDocumentContentKind:(DDXMLDocumentContentKind)kind;
//- (DDXMLDocumentContentKind)documentContentKind;
//- (void)setMIMEType:(NSString *)MIMEType;
//- (NSString *)MIMEType;
//- (void)setDTD:(DDXMLDTD *)documentTypeDeclaration;
//- (DDXMLDTD *)DTD;
//- (void)setRootElement:(DDXMLNode *)root;
- (nullable DDXMLElement *)rootElement;
//- (void)insertChild:(DDXMLNode *)child atIndex:(NSUInteger)index;
//- (void)insertChildren:(NSArray *)children atIndex:(NSUInteger)index;
//- (void)removeChildAtIndex:(NSUInteger)index;
//- (void)setChildren:(NSArray *)children;
//- (void)addChild:(DDXMLNode *)child;
//- (void)replaceChildAtIndex:(NSUInteger)index withNode:(DDXMLNode *)node;
@property (readonly, copy) NSData *XMLData;
- (NSData *)XMLDataWithOptions:(NSUInteger)options;
//- (instancetype)objectByApplyingXSLT:(NSData *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
//- (instancetype)objectByApplyingXSLTString:(NSString *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
//- (instancetype)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(NSDictionary *)argument error:(NSError **)error;
//- (BOOL)validateAndReturnError:(NSError **)error;
@end
NS_ASSUME_NONNULL_END