ObjFW  Diff

Differences From Artifact [21ba954ddd]:

To Artifact [13948b0a6c]:


86
87
88
89
90
91
92
93

94
95
96
97
98
99

100
101
102
103
104


105
106
107

108
109
110


111
112

113
114
115
116
117
118
119
86
87
88
89
90
91
92

93
94
95
96
97
98

99
100
101
102


103
104
105
106

107
108


109
110
111

112
113
114
115
116
117
118
119







-
+





-
+



-
-
+
+


-
+

-
-
+
+

-
+







-    (void)parser: (OFXMLParser*)parser
  didStartElement: (OFString*)name
       withPrefix: (OFString*)prefix
	namespace: (OFString*)ns
       attributes: (OFArray*)attributes
{
	OFXMLElement *element;
	OFXMLAttribute **cArray;
	OFXMLAttribute **objects;
	size_t i, count;

	element = [OFXMLElement elementWithName: name
				      namespace: ns];

	cArray = [attributes cArray];
	objects = [attributes objects];
	count = [attributes count];

	for (i = 0; i < count; i++) {
		if ([cArray[i] namespace] == nil &&
		    [[cArray[i] name] isEqual: @"xmlns"])
		if ([objects[i] namespace] == nil &&
		    [[objects[i] name] isEqual: @"xmlns"])
			continue;

		if ([[cArray[i] namespace]
		if ([[objects[i] namespace]
		    isEqual: @"http://www.w3.org/2000/xmlns/"])
			[element setPrefix: [cArray[i] name]
			      forNamespace: [cArray[i] stringValue]];
			[element setPrefix: [objects[i] name]
			      forNamespace: [objects[i] stringValue]];

		[element addAttribute: cArray[i]];
		[element addAttribute: objects[i]];
	}

	[[stack lastObject] addChild: element];
	[stack addObject: element];
}

-  (void)parser: (OFXMLParser*)parser