@@ -53,10 +53,15 @@ + elementWithCharacters: (OFString*)chars { return [[[self alloc] initWithCharacters: chars] autorelease]; } + ++ elementWithCDATA: (OFString*)cdata +{ + return [[[self alloc] initWithCDATA: cdata] autorelease]; +} + elementWithComment: (OFString*)comment { return [[[self alloc] initWithComment: comment] autorelease]; } @@ -119,10 +124,19 @@ characters = [chars copy]; return self; } + +- initWithCDATA: (OFString*)cdata_ +{ + self = [super init]; + + cdata = [cdata_ copy]; + + return self; +} - initWithComment: (OFString*)comment_ { self = [super init]; @@ -144,10 +158,14 @@ OFString *def_ns; if (characters != nil) return [characters stringByXMLEscaping]; + if (cdata != nil) + return [OFString stringWithFormat: @"", + [cdata cString]]; + if (comment != nil) { OFMutableString *str; str = [OFMutableString stringWithString: @"