mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
* 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:
parent
a9ae729b91
commit
06a892ed28
5 changed files with 90 additions and 28 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue