{
NSString *davNS;
- davNS = [_prefixes objectForKey:XMLNS_WEBDAV];
+ davNS = [[_prefixes objectForKey:XMLNS_WEBDAV] stringValue];
if ([_value isKindOfClass:[NSArray class]]) {
/*
if (![item isKindOfClass:[NSArray class]]) {
item = [item stringValue];
if (![item isNotEmpty]) continue;
- [ms appendFormat:@"<%@:%@ />", davNS, item];
+
+ if (_requireTagValue) {
+ [ms appendString:@"<"];
+ [ms appendString:davNS];
+ [ms appendString:@":"];
+ [ms appendString:item];
+ [ms appendString:@" />"];
+ }
+ else
+ [ms appendString:[item stringByEscapingXMLString]];
+
continue;
}