50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
_text = [element.stringValue copy];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
|
|
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OFSerializationNS])
@throw [OFInvalidArgumentException exception];
_text = [element.stringValue copy];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
|
136
137
138
139
140
141
142
143
144
145
146
|
{
return [OFString stringWithFormat: @"<!--%@-->", _text];
}
- (OFXMLElement *)XMLElementBySerializing
{
return [OFXMLElement elementWithName: self.className
namespace: OF_SERIALIZATION_NS
stringValue: _text];
}
@end
|
|
|
136
137
138
139
140
141
142
143
144
145
146
|
{
return [OFString stringWithFormat: @"<!--%@-->", _text];
}
- (OFXMLElement *)XMLElementBySerializing
{
return [OFXMLElement elementWithName: self.className
namespace: OFSerializationNS
stringValue: _text];
}
@end
|