72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
-
+
|
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OF_SERIALIZATION_NS])
![element.namespace isEqual: OFSerializationNS])
@throw [OFInvalidArgumentException exception];
_name = [[element attributeForName: @"name"].stringValue copy];
_namespace = [[element attributeForName: @"namespace"]
.stringValue copy];
_stringValue = [[element attributeForName: @"stringValue"]
.stringValue copy];
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
-
+
|
- (OFXMLElement *)XMLElementBySerializing
{
void *pool = objc_autoreleasePoolPush();
OFXMLElement *element;
element = [OFXMLElement elementWithName: self.className
namespace: OF_SERIALIZATION_NS];
namespace: OFSerializationNS];
[element addAttributeWithName: @"name" stringValue: _name];
if (_namespace != nil)
[element addAttributeWithName: @"namespace"
stringValue: _namespace];
[element addAttributeWithName: @"stringValue"
|