< DOMCharacterData > Protocol Reference

Inheritance diagram for < DOMCharacterData >:

< DOMNode > DOMCharacterData < DOMComment > < DOMText > DOMComment DOMText DOMComment < DOMCDATASection > DOMText DOMCDATASection DOMCDATASection DOMCDATASection List of all members.

Public Member Functions

(NSString *)  data
(NSString *)  dataIgnoreWhitespace:
(unsigned)  length
(NSString *)  substringDataWithRange:
(void)  setData:
(void)  appendData:
(void)  insertData:atOffset:
(void)  deleteDataInRange:
(void)  replaceDataInRange:withData:
(BOOL)  normalizeWhitespace

Member Function Documentation

- (void) appendData: (NSString *)  data  
 

- (NSString *) data  
 

Returns the string of this object.

- (NSString *) dataIgnoreWhitespace: (BOOL)  noWS  
 

Returns the string of this object without "ignorable whitespace".

- (void) deleteDataInRange: (NSRange)  range  
 

Parameters:
range 

- (void) insertData: (NSString *)  data
atOffset: (int)  offset
 
 

Parameters:
data 
offset 

- (unsigned) length  
 

Returns the length of this character data.

- (BOOL) normalizeWhitespace  
 

Trims whitespace from the begining and end and replaces all whitespace runs with a single space.

This means that tabs and newlines are also replaced by spaces.

Rules:

  • If the data starts with a space, that space is kept.
  • If the data ends with whitespace, it will end in a single space.
  • If the data is nothing but whitespace, it will be empty.

Returns:
Returns true if the node was changed

- (void) replaceDataInRange: (NSRange)  range
withData: (NSString *)  data
 
 

Parameters:
range 
data 

- (void) setData: (NSString *)  string  
 

Sets the string of this object.

- (NSString *) substringDataWithRange: (NSRange)  range