pull/34/head
Ludovic Marcotte 2014-04-09 18:03:33 -04:00
parent 96ece873ca
commit 33467093c1
2 changed files with 31 additions and 5 deletions

View File

@ -37,6 +37,28 @@ static NSArray *asElementArray = nil;
@implementation NGDOMElement (ActiveSync)
- (BOOL) isTextNode
{
id <DOMNodeList> children;
id <DOMElement> element;
int i;
if ([self nodeType] == DOM_TEXT_NODE)
return YES;
children = [self childNodes];
for (i = 0; i < [children length]; i++)
{
element = [children objectAtIndex: i];
if ([element nodeType] != DOM_TEXT_NODE)
return NO;
}
return YES;
}
//
// We must handle "inner data" like this:
//
@ -96,9 +118,13 @@ static NSArray *asElementArray = nil;
tag = [element tagName];
count = [(NSArray *)[element childNodes] count];
if ([element isTextNode])
{
value = [element textValue];
}
// Handle inner data - see above for samples
if (count > 2)
else
{
NSMutableArray *innerElements;
id <DOMElement> innerElement;
@ -144,12 +170,11 @@ static NSArray *asElementArray = nil;
value = nil;
}
}
else
value = [[element firstChild] textValue];
if (value && tag)
[data setObject: value forKey: tag];
}
} // if ([element nodeType] == DOM_ELEMENT_NODE)
}
return data;

1
NEWS
View File

@ -15,6 +15,7 @@ Bug fixes
- improved folder rename operations using ActiveSync (#2700)
- fixed SmartReply/Forward when ReplaceMime was omitted (#2680)
- fixed wrong generation of weekly repetitive events with ActiveSync (#2654)
- fixed incorrect XML data conversion with ActiveSync (#2695)
2.2.3 (2014-04-03)
------------------