mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
* Source/NSXMLDocument.m: Change stack implementation to
use lastObject/removeLastObject to implement the stack instead of inserting and deleting at index 0. * Source/NSXMLElement.m: Implemented XMLStringWithOptions: * Source/NSXMLNode.m: Implemented XMLStringWithOptions:, skeletal implementation of setStringValue:resolvingEntities: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34403 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9a5f196bf1
commit
8f97e14738
4 changed files with 74 additions and 7 deletions
|
@ -488,7 +488,22 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
|
||||
- (NSString*) XMLStringWithOptions: (NSUInteger)options
|
||||
{
|
||||
return [self notImplemented: _cmd]; // FIXME ... generate from libxml
|
||||
NSMutableString *returnValue = [NSMutableString string];
|
||||
NSXMLNodeKind kind = [self kind];
|
||||
|
||||
if(kind == NSXMLAttributeKind)
|
||||
{
|
||||
[returnValue appendString: [self name]];
|
||||
[returnValue appendString: @"=\""];
|
||||
[returnValue appendString: [self stringValue]];
|
||||
[returnValue appendString: @"\""];
|
||||
}
|
||||
else
|
||||
{
|
||||
// for all other types, do nothing for now...
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
- (void) setObjectValue: (id)value
|
||||
|
@ -513,7 +528,14 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
|
||||
- (void) setStringValue: (NSString*)string resolvingEntities: (BOOL)resolve
|
||||
{
|
||||
[self notImplemented: _cmd]; // FIXME ... set in libxml
|
||||
if(resolve == NO)
|
||||
{
|
||||
ASSIGN(_objectValue, string);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN(_objectValue, string); // need to actually resolve entities...
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString*) XPath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue