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

-    (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];

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

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

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

		[element addAttribute: objects[i]];
	}

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

-  (void)parser: (OFXMLParser*)parser







<
<
<
<
|
|

<
<
|
<
|
|


|

|
|

|







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 = [OFXMLElement elementWithName: name
						    namespace: namespace];



	for (OFXMLAttribute *attribute in attributes) {

		if ([attribute namespace] == nil &&
		    [[attribute name] isEqual: @"xmlns"])
			continue;

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

		[element addAttribute: attribute];
	}

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

-  (void)parser: (OFXMLParser*)parser