ObjFW  Diff

Differences From Artifact [bdb4c731ad]:

To Artifact [4e94b4d443]:


74
75
76
77
78
79
80
81
82
83
84
85
86


87
88
89
90

91
92
93


94
95
96

97
98
99


100
101

102
103
104
105
106
107
108
74
75
76
77
78
79
80






81
82
83



84



85
86
87
88

89
90


91
92
93

94
95
96
97
98
99
100
101







-
-
-
-
-
-
+
+

-
-
-
+
-
-
-
+
+


-
+

-
-
+
+

-
+








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

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

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

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

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

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

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

-  (void)parser: (OFXMLParser*)parser