2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #include "DOMProcessingInstruction.h"
25 @implementation DOMProcessingInstruction
27 - (id)initWithTarget:(NSString *)_target data:(NSString *)_data {
28 if ((self = [super init])) {
29 self->target = [_target copy];
30 self->data = [_data copy];
36 [self->target release];
43 - (NSString *)target {
47 - (void)setData:(NSString *)_data {
49 self->data = [_data copy];
58 - (DOMNodeType)nodeType {
59 return DOM_PROCESSING_INSTRUCTION_NODE;
66 - (BOOL)_isValidChildNode:(id)_node {
69 - (BOOL)hasChildNodes {
70 /* PI's have no children ! */
74 /* PI's have no children ! */
77 - (id)appendChild:(id)_node {
78 /* PI's have no children ! */
84 - (void)_domNodeRegisterParentNode:(id)_parent {
85 self->parent = _parent;
87 - (void)_domNodeForgetParentNode:(id)_parent {
88 if (_parent == self->parent)
89 /* the node's parent was deallocated */
98 - (NSString *)description {
99 return [NSString stringWithFormat:@"<0x%08X[%@]: target=%@ data='%@'>",
100 self, NSStringFromClass([self class]),
101 [self target], [self data]];
104 @end /* DOMProcessingInstruction */