* Tests/base/NSXMLElement/attributes.m: Test for changed

exception.
* Tests/base/NSXMLNode/basic.m: More tests.
* Source/NSXMLNode.m: Rewrite object value handling.
* Source/NSXMLElement.m (-objectValue): Return @"" when the
value is nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34881 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2012-03-05 22:48:18 +00:00
parent a9ae729b91
commit 06a892ed28
5 changed files with 90 additions and 28 deletions

View file

@ -61,11 +61,7 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
{
if (NSXMLElementKind == kind)
{
if ((self = [super initWithKind: kind options: theOptions]))
{
internal->objectValue = @"";
}
return self;
return [super initWithKind: kind options: theOptions];
}
else
{
@ -123,6 +119,15 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
return result;
}
- (id) objectValue
{
if (internal->objectValue == nil)
{
return @"";
}
return internal->objectValue;
}
- (NSArray*) elementsForName: (NSString*)name
{
NSMutableArray *results = [NSMutableArray arrayWithCapacity: 10];