-
Notifications
You must be signed in to change notification settings - Fork 1
/
DDXMLPrivate.h
executable file
·79 lines (50 loc) · 2.39 KB
/
DDXMLPrivate.h
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
#import "DDXMLNode.h"
#import "DDXMLElement.h"
#import "DDXMLDocument.h"
// We can't rely solely on NSAssert, because many developers disable them for release builds.
// Our API contract requires us to keep these assertions intact.
#define DDCheck(condition, desc, ...) { if(!(condition)) { [[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd object:self file:[NSString stringWithUTF8String:__FILE__] lineNumber:__LINE__ description:(desc), ##__VA_ARGS__]; } }
#define DDLastErrorKey @"DDXML:LastError"
@interface DDXMLNode (PrivateAPI)
+ (id)nodeWithUnknownPrimitive:(xmlKindPtr)kindPtr;
+ (id)nodeWithPrimitive:(xmlKindPtr)kindPtr;
- (id)initWithCheckedPrimitive:(xmlKindPtr)kindPtr;
+ (id)nodeWithPrimitive:(xmlNsPtr)ns nsParent:(xmlNodePtr)parent;
- (id)initWithCheckedPrimitive:(xmlNsPtr)ns nsParent:(xmlNodePtr)parent;
+ (BOOL)isXmlAttrPtr:(xmlKindPtr)kindPtr;
- (BOOL)isXmlAttrPtr;
+ (BOOL)isXmlNodePtr:(xmlKindPtr)kindPtr;
- (BOOL)isXmlNodePtr;
+ (BOOL)isXmlDocPtr:(xmlKindPtr)kindPtr;
- (BOOL)isXmlDocPtr;
+ (BOOL)isXmlDtdPtr:(xmlKindPtr)kindPtr;
- (BOOL)isXmlDtdPtr;
+ (BOOL)isXmlNsPtr:(xmlKindPtr)kindPtr;
- (BOOL)isXmlNsPtr;
- (BOOL)hasParent;
+ (void)recursiveStripDocPointersFromNode:(xmlNodePtr)node;
+ (void)detachAttribute:(xmlAttrPtr)attr fromNode:(xmlNodePtr)node;
+ (void)removeAttribute:(xmlAttrPtr)attr fromNode:(xmlNodePtr)node;
+ (void)removeAllAttributesFromNode:(xmlNodePtr)node;
+ (void)detachNamespace:(xmlNsPtr)ns fromNode:(xmlNodePtr)node;
+ (void)removeNamespace:(xmlNsPtr)ns fromNode:(xmlNodePtr)node;
+ (void)removeAllNamespacesFromNode:(xmlNodePtr)node;
+ (void)detachChild:(xmlNodePtr)child fromNode:(xmlNodePtr)node;
+ (void)removeChild:(xmlNodePtr)child fromNode:(xmlNodePtr)node;
+ (void)removeAllChildrenFromNode:(xmlNodePtr)node;
+ (void)removeAllChildrenFromDoc:(xmlDocPtr)doc;
- (void)nodeRetain;
- (void)nodeRelease;
+ (NSError *)lastError;
@end
@interface DDXMLElement (PrivateAPI)
+ (id)nodeWithPrimitive:(xmlKindPtr)kindPtr;
- (id)initWithCheckedPrimitive:(xmlKindPtr)kindPtr;
- (NSArray *)elementsWithName:(NSString *)name uri:(NSString *)URI;
+ (DDXMLNode *)resolveNamespaceForPrefix:(NSString *)prefix atNode:(xmlNodePtr)nodePtr;
+ (NSString *)resolvePrefixForURI:(NSString *)uri atNode:(xmlNodePtr)nodePtr;
@end
@interface DDXMLDocument (PrivateAPI)
+ (id)nodeWithPrimitive:(xmlKindPtr)kindPtr;
- (id)initWithCheckedPrimitive:(xmlKindPtr)kindPtr;
@end