Minor api tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14552 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-09-25 15:32:11 +00:00
parent 14fb009311
commit c18b1e9b6b
3 changed files with 30 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2002-09-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: Added ([-previousElement]) to match the
[(-nextElement]) method.
Wed Sep 25 02:46:28 2002 Nicola Pero <n.pero@mi.flashnet.it>
* Tools/make_strings/make_strings.m (main): Remove "" languages

View file

@ -133,6 +133,7 @@
- (NSString*) objectForKey: (NSString*)key;
- (GSXMLNode*) parent;
- (GSXMLNode*) previous;
- (GSXMLNode*) previousElement;
- (NSMutableDictionary*) propertiesAsDictionaryWithKeyTransformationSel:
(SEL)keyTransformSel;
- (void) setObject: (NSString*)value forKey:(NSString*)key;

View file

@ -209,6 +209,9 @@ static NSMapTable *attrNames = 0;
return desc;
}
/**
* Return the next sibling node.
*/
- (GSXMLNode*) next
{
if (((xmlAttrPtr)(lib))->next != NULL)
@ -1215,6 +1218,27 @@ static NSMapTable *nodeNames = 0;
}
}
/**
* Return the previous element node at this level.
*/
- (GSXMLNode*) previousElement
{
xmlNodePtr ptr = (xmlNodePtr)lib;
while (ptr->prev != NULL)
{
ptr = ptr->prev;
if (ptr->type == XML_ELEMENT_NODE)
{
GSXMLNode *n = [GSXMLNode alloc];
n = [n _initFrom: ptr parent: self];
return AUTORELEASE(n);
}
}
return nil;
}
/**
* <p>