789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
|
}
- (OFXMLAttribute *)attributeForName: (OFString *)attributeName
{
for (OFXMLAttribute *attribute in _attributes)
if (attribute->_namespace == nil &&
[attribute->_name isEqual: attributeName])
return [[attribute retain] autorelease];
return nil;
}
- (OFXMLAttribute *)attributeForName: (OFString *)attributeName
namespace: (OFString *)attributeNS
{
if (attributeNS == nil)
return [self attributeForName: attributeName];
for (OFXMLAttribute *attribute in _attributes)
if ([attribute->_namespace isEqual: attributeNS] &&
[attribute->_name isEqual: attributeName])
return [[attribute retain] autorelease];
return nil;
}
- (void)removeAttributeForName: (OFString *)attributeName
{
OFXMLAttribute *const *objects = [_attributes objects];
|
|
|
|
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
|
}
- (OFXMLAttribute *)attributeForName: (OFString *)attributeName
{
for (OFXMLAttribute *attribute in _attributes)
if (attribute->_namespace == nil &&
[attribute->_name isEqual: attributeName])
return attribute;
return nil;
}
- (OFXMLAttribute *)attributeForName: (OFString *)attributeName
namespace: (OFString *)attributeNS
{
if (attributeNS == nil)
return [self attributeForName: attributeName];
for (OFXMLAttribute *attribute in _attributes)
if ([attribute->_namespace isEqual: attributeNS] &&
[attribute->_name isEqual: attributeName])
return attribute;
return nil;
}
- (void)removeAttributeForName: (OFString *)attributeName
{
OFXMLAttribute *const *objects = [_attributes objects];
|