| 1 |
#import <Foundation/Foundation.h> |
| 2 |
#import "DDXMLElement.h" |
| 3 |
#import "DDXMLNode.h" |
| 4 |
|
| 5 |
|
| 6 |
enum { |
| 7 |
DDXMLDocumentXMLKind = 0, |
| 8 |
DDXMLDocumentXHTMLKind, |
| 9 |
DDXMLDocumentHTMLKind, |
| 10 |
DDXMLDocumentTextKind |
| 11 |
}; |
| 12 |
typedef NSUInteger DDXMLDocumentContentKind; |
| 13 |
|
| 14 |
@interface DDXMLDocument : DDXMLNode |
| 15 |
{ |
| 16 |
} |
| 17 |
|
| 18 |
- (id)initWithXMLString:(NSString *)string options:(NSUInteger)mask error:(NSError **)error; |
| 19 |
//- (id)initWithContentsOfURL:(NSURL *)url options:(NSUInteger)mask error:(NSError **)error; |
| 20 |
- (id)initWithData:(NSData *)data options:(NSUInteger)mask error:(NSError **)error; |
| 21 |
//- (id)initWithRootElement:(DDXMLElement *)element; |
| 22 |
|
| 23 |
//+ (Class)replacementClassForClass:(Class)cls; |
| 24 |
|
| 25 |
//- (void)setCharacterEncoding:(NSString *)encoding; //primitive |
| 26 |
//- (NSString *)characterEncoding; //primitive |
| 27 |
|
| 28 |
//- (void)setVersion:(NSString *)version; |
| 29 |
//- (NSString *)version; |
| 30 |
|
| 31 |
//- (void)setStandalone:(BOOL)standalone; |
| 32 |
//- (BOOL)isStandalone; |
| 33 |
|
| 34 |
//- (void)setDocumentContentKind:(DDXMLDocumentContentKind)kind; |
| 35 |
//- (DDXMLDocumentContentKind)documentContentKind; |
| 36 |
|
| 37 |
//- (void)setMIMEType:(NSString *)MIMEType; |
| 38 |
//- (NSString *)MIMEType; |
| 39 |
|
| 40 |
//- (void)setDTD:(DDXMLDTD *)documentTypeDeclaration; |
| 41 |
//- (DDXMLDTD *)DTD; |
| 42 |
|
| 43 |
//- (void)setRootElement:(DDXMLNode *)root; |
| 44 |
- (DDXMLElement *)rootElement; |
| 45 |
|
| 46 |
//- (void)insertChild:(DDXMLNode *)child atIndex:(NSUInteger)index; |
| 47 |
|
| 48 |
//- (void)insertChildren:(NSArray *)children atIndex:(NSUInteger)index; |
| 49 |
|
| 50 |
//- (void)removeChildAtIndex:(NSUInteger)index; |
| 51 |
|
| 52 |
//- (void)setChildren:(NSArray *)children; |
| 53 |
|
| 54 |
//- (void)addChild:(DDXMLNode *)child; |
| 55 |
|
| 56 |
//- (void)replaceChildAtIndex:(NSUInteger)index withNode:(DDXMLNode *)node; |
| 57 |
|
| 58 |
- (NSData *)XMLData; |
| 59 |
- (NSData *)XMLDataWithOptions:(NSUInteger)options; |
| 60 |
|
| 61 |
//- (id)objectByApplyingXSLT:(NSData *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error; |
| 62 |
//- (id)objectByApplyingXSLTString:(NSString *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error; |
| 63 |
//- (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(NSDictionary *)argument error:(NSError **)error; |
| 64 |
|
| 65 |
//- (BOOL)validateAndReturnError:(NSError **)error; |
| 66 |
|
| 67 |
@end |