DOMNode.h
Go to the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #import <Foundation/Foundation.h>
00028 #import "DOMVisitor.h"
00029
00030
00037 typedef enum {
00038 DOMUnknownNodeType = -1,
00039 DOMElementNodeType = 1,
00040 DOMAttributeNodeType = 2,
00041 DOMTextNodeType = 3,
00042 DOMCDATASectionNodeType = 4,
00043 DOMEntityReferenceNodeType = 5,
00044 DOMEntityNodeType = 6,
00045 DOMProcessingInstructionNodeType = 7,
00046 DOMCommentNodeType = 8,
00047 DOMDocumentNodeType = 9,
00048 DOMDocTypeNodeType = 10,
00049 DOMDocumentFragmentNodeType = 11,
00050 DOMNotationNodeType = 12
00051 } DOMNodeType;
00052
00053
00054 @protocol DOMNode, DOMDocument, DOMElement, DOMParent;
00055
00056
00077 @protocol DOMNode <NSObject>
00078
00099 - (NSString *)nodeName;
00100
00108 - (NSString *)nodeValue;
00109
00117 - (DOMNodeType)nodeType;
00118
00122 - (id <DOMParent, DOMNode>)parentNode;
00123
00134 - (void)setParentNode:(id <DOMParent, DOMNode>)newParent;
00135
00144 - (id <DOMDocument>)ownerDocument;
00145
00159 - (id <DOMNode>)detach;
00160
00170 - (BOOL)isDetached;
00171
00175 - (BOOL)hasChildren;
00176
00181 - (id <DOMNode>)previousSibling;
00182
00187 - (id <DOMNode>)nextSibling;
00188
00209 - (NSString *)textContent;
00210
00231 - (void)setTextContent:(NSString *)text;
00232
00233
00248 - (BOOL)isEqualToNode:(id <DOMNode>)node;
00249
00250 @end
00251
00252
00256 @interface DOMNode : NSObject <DOMNode, DOMVisitable, NSCopying> {
00257 @private
00258 id <DOMParent, DOMNode> parent;
00259 }
00260
00261 @end