mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
* Source/NSXMLElement.m: Remove setObjectValue: implementation.
* Source/NSXMLNode.m: Remove comments around code to replace nil value. * Tests/base/NSXMLNode/basic.m: correct test. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34611 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b34c744c20
commit
f7851efd2a
4 changed files with 9 additions and 39 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2012-01-23 12:09-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSXMLElement.m: Remove setObjectValue: implementation.
|
||||||
|
* Source/NSXMLNode.m: Remove comments around code to replace
|
||||||
|
nil value.
|
||||||
|
* Tests/base/NSXMLNode/basic.m: correct test.
|
||||||
|
|
||||||
2012-01-21 06:16-EST Gregory John Casamento <greg.casamento@gmail.com>
|
2012-01-21 06:16-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Source/NSXMLDocument.m
|
* Source/NSXMLDocument.m
|
||||||
|
|
|
@ -239,16 +239,6 @@ extern void clearPrivatePointers(xmlNodePtr aNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setObjectValue: (id)value
|
|
||||||
{
|
|
||||||
if(nil == value)
|
|
||||||
{
|
|
||||||
ASSIGN(internal->objectValue, [NSString stringWithString: @""]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ASSIGN(internal->objectValue, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSArray*) namespaces
|
- (NSArray*) namespaces
|
||||||
{
|
{
|
||||||
NSMutableArray *result = nil;
|
NSMutableArray *result = nil;
|
||||||
|
|
|
@ -101,32 +101,6 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
+ (xmlNodePtr) _nodeForObject: (NSXMLNode *)object
|
|
||||||
{
|
|
||||||
xmlNodePtr node = NULL;
|
|
||||||
if(object)
|
|
||||||
{
|
|
||||||
NSXMLNodeKind kind = [object kind];
|
|
||||||
switch (kind)
|
|
||||||
{
|
|
||||||
case(NSXMLAttributeKind):
|
|
||||||
node = (xmlNodePtr)xmlNewProp(NULL,
|
|
||||||
(xmlChar *)XMLSTRING([object name]),
|
|
||||||
(xmlChar *)XMLSTRING([object stringValue]));
|
|
||||||
break;
|
|
||||||
case(NSXMLElementKind):
|
|
||||||
node = xmlNewNode(NULL,XMLSTRING([object name]));
|
|
||||||
break;
|
|
||||||
case(NSXMLInvalidKind):
|
|
||||||
node = xmlNewNode(NULL,XMLSTRING([object name]));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
- (void) _addSubNode:(NSXMLNode *)subNode
|
- (void) _addSubNode:(NSXMLNode *)subNode
|
||||||
{
|
{
|
||||||
if (!internal->subNodes)
|
if (!internal->subNodes)
|
||||||
|
@ -991,13 +965,11 @@ NSArray *execute_xpath(NSXMLNode *node,
|
||||||
|
|
||||||
- (void) setObjectValue: (id)value
|
- (void) setObjectValue: (id)value
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if(nil == value)
|
if(nil == value)
|
||||||
{
|
{
|
||||||
ASSIGN(internal->objectValue, [NSString stringWithString: @""]);
|
ASSIGN(internal->objectValue, [NSString stringWithString: @""]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
ASSIGN(internal->objectValue, value);
|
ASSIGN(internal->objectValue, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ int main()
|
||||||
PASS_EQUAL([node objectValue], @"anObject",
|
PASS_EQUAL([node objectValue], @"anObject",
|
||||||
"setting object value on invalid node works");
|
"setting object value on invalid node works");
|
||||||
[node setObjectValue: nil];
|
[node setObjectValue: nil];
|
||||||
PASS_EQUAL([node objectValue], nil,
|
// Per documentation on NSXMLNode setObjectValue/objectValue,
|
||||||
|
PASS_EQUAL([node objectValue], @"",
|
||||||
"setting nil object value on invalid node works");
|
"setting nil object value on invalid node works");
|
||||||
[node setStringValue: @"aString"];
|
[node setStringValue: @"aString"];
|
||||||
PASS_EQUAL([node stringValue], @"aString",
|
PASS_EQUAL([node stringValue], @"aString",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue