DOMCharacterData.h

Go to the documentation of this file.
00001 /*
00002  * Iconara DOM framework: DOMCharacterData (created 26 August 2002)
00003  *
00004  * Release 1
00005  *
00006  * Copyright 2002-2005 Iconara/Theo Hultberg
00007  *
00008  *
00009  * This file is part of the Iconara DOM framework.
00010  *
00011  * Iconara DOM is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * Iconara DOM is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with Iconara DOM; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  *
00025  */
00026 
00027 #import <Foundation/Foundation.h>
00028 #import "DOMNode.h"
00029 
00030 
00031 @protocol DOMCharacterData <DOMNode>
00032 
00036 - (NSString *)data;
00037 
00041 - (NSString *)dataIgnoreWhitespace:(BOOL)noWS;
00042 
00046 - (unsigned)length;
00047 
00051 - (NSString *)substringDataWithRange:(NSRange)range;
00052 
00056 - (void)setData:(NSString *)string;
00057 
00061 - (void)appendData:(NSString *)data;
00062 
00067 - (void)insertData:(NSString *)data atOffset:(int)offset;
00068 
00072 - (void)deleteDataInRange:(NSRange)range;
00073 
00078 - (void)replaceDataInRange:(NSRange)range withData:(NSString *)data;
00079 
00093 - (BOOL)normalizeWhitespace;
00094 
00095 @end
00096 
00097 
00101 @interface DOMCharacterData : DOMNode <DOMCharacterData> {
00102     NSString *data;
00103 }
00104 
00108 - (id)initWithData:(NSString *)data;
00109 
00110 @end
00111 
00112 
00116 @interface DOMCharacterData ( WhitespaceUtilities )
00117 
00121 + (NSString *)whitespaceNormalizedDataOfNode:(id <DOMCharacterData>)string;
00122 
00126 + (NSString *)implodeWhitespace:(NSString *)string;
00127 
00128 @end