mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-14 18:10:57 +00:00
Remove uneeded ivars.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34516 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6983dd6e31
commit
db0fefff04
5 changed files with 103 additions and 106 deletions
|
@ -46,7 +46,6 @@ GS_PRIVATE_INTERNAL(NSXMLDTD)
|
||||||
[internal->entities release];
|
[internal->entities release];
|
||||||
[internal->elements release];
|
[internal->elements release];
|
||||||
[internal->notations release];
|
[internal->notations release];
|
||||||
[internal->attributes release];
|
|
||||||
[internal->original release];
|
[internal->original release];
|
||||||
}
|
}
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
@ -117,7 +116,6 @@ GS_PRIVATE_INTERNAL(NSXMLDTD)
|
||||||
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
internal->childrenHaveMutated = YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
||||||
|
@ -169,13 +167,11 @@ GS_PRIVATE_INTERNAL(NSXMLDTD)
|
||||||
- (void) setPublicID: (NSString*)publicID
|
- (void) setPublicID: (NSString*)publicID
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
internal->modified = YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setSystemID: (NSString*)systemID
|
- (void) setSystemID: (NSString*)systemID
|
||||||
{
|
{
|
||||||
[self notImplemented: _cmd];
|
[self notImplemented: _cmd];
|
||||||
internal->modified = YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) systemID
|
- (NSString*) systemID
|
||||||
|
|
|
@ -51,8 +51,6 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
{
|
{
|
||||||
[internal->docType release];
|
[internal->docType release];
|
||||||
[internal->MIMEType release];
|
[internal->MIMEType release];
|
||||||
[internal->elementStack release];
|
|
||||||
[internal->xmlData release];
|
|
||||||
}
|
}
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
@ -246,7 +244,12 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
||||||
{
|
{
|
||||||
NSXMLNodeKind kind;
|
NSXMLNodeKind kind;
|
||||||
|
NSXMLNode *next = nil;
|
||||||
|
xmlNodePtr nextNode = NULL;
|
||||||
|
xmlNodePtr newNode = NULL;
|
||||||
|
xmlNodePtr prevNode = NULL;
|
||||||
|
|
||||||
|
// Check to make sure this is a valid addition...
|
||||||
NSAssert(nil != child, NSInvalidArgumentException);
|
NSAssert(nil != child, NSInvalidArgumentException);
|
||||||
NSAssert(index <= [self childCount], NSInvalidArgumentException);
|
NSAssert(index <= [self childCount], NSInvalidArgumentException);
|
||||||
NSAssert(nil == [child parent], NSInvalidArgumentException);
|
NSAssert(nil == [child parent], NSInvalidArgumentException);
|
||||||
|
@ -260,14 +263,19 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
NSAssert(NSXMLNamespaceKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLNamespaceKind != kind, NSInvalidArgumentException);
|
||||||
NSAssert(NSXMLNotationDeclarationKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLNotationDeclarationKind != kind, NSInvalidArgumentException);
|
||||||
|
|
||||||
if (nil == internal->children)
|
// Get all of the nodes...
|
||||||
{
|
newNode = ((xmlNodePtr)[child _node]);
|
||||||
internal->children = [[NSMutableArray alloc] initWithCapacity: 10];
|
next = [self childAtIndex: index];
|
||||||
}
|
nextNode = ((xmlNodePtr)[next _node]);
|
||||||
[internal->children insertObject: child
|
prevNode = nextNode->prev;
|
||||||
atIndex: index];
|
|
||||||
|
// Make all of the links...
|
||||||
|
prevNode->next = newNode;
|
||||||
|
newNode->next = nextNode;
|
||||||
|
newNode->prev = prevNode;
|
||||||
|
nextNode->prev = newNode;
|
||||||
|
|
||||||
GSIVar(child, parent) = self;
|
GSIVar(child, parent) = self;
|
||||||
internal->childCount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
||||||
|
@ -283,50 +291,39 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
|
|
||||||
- (void) removeChildAtIndex: (NSUInteger)index
|
- (void) removeChildAtIndex: (NSUInteger)index
|
||||||
{
|
{
|
||||||
NSXMLNode *child = [internal->children objectAtIndex: index];
|
NSXMLNode *child;
|
||||||
|
xmlNodePtr n;
|
||||||
|
|
||||||
if (nil != child)
|
if (index >= [self childCount])
|
||||||
{
|
{
|
||||||
if (internal->rootElement == child)
|
[NSException raise: NSRangeException
|
||||||
{
|
format: @"index to large"];
|
||||||
internal->rootElement = nil;
|
|
||||||
}
|
|
||||||
GSIVar(child, parent) = nil;
|
|
||||||
[internal->children removeObjectAtIndex: index];
|
|
||||||
if (0 == --internal->childCount)
|
|
||||||
{
|
|
||||||
/* The -children method must return nil if there are no children,
|
|
||||||
* so we destroy the container.
|
|
||||||
*/
|
|
||||||
DESTROY(internal->children);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
child = [[self children] objectAtIndex: index];
|
||||||
|
n = [child _node];
|
||||||
|
xmlUnlinkNode(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setChildren: (NSArray*)children
|
- (void) setChildren: (NSArray*)children
|
||||||
{
|
{
|
||||||
if (children != internal->children)
|
NSEnumerator *en;
|
||||||
{
|
NSXMLNode *child;
|
||||||
NSEnumerator *en;
|
|
||||||
NSXMLNode *child;
|
|
||||||
|
|
||||||
[children retain];
|
while ([self childCount] > 0)
|
||||||
while (internal->childCount > 0)
|
{
|
||||||
{
|
[self removeChildAtIndex: [self childCount] - 1];
|
||||||
[self removeChildAtIndex:internal->childCount - 1];
|
}
|
||||||
}
|
en = [[self children] objectEnumerator];
|
||||||
en = [children objectEnumerator];
|
while ((child = [en nextObject]) != nil)
|
||||||
while ((child = [en nextObject]) != nil)
|
{
|
||||||
{
|
[self insertChild: child atIndex: [self childCount]];
|
||||||
[self insertChild: child atIndex: internal->childCount];
|
|
||||||
}
|
|
||||||
[children release];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addChild: (NSXMLNode*)child
|
- (void) addChild: (NSXMLNode*)child
|
||||||
{
|
{
|
||||||
[self insertChild: child atIndex: internal->childCount];
|
[self insertChild: child atIndex: [self childCount]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) replaceChildAtIndex: (NSUInteger)index withNode: (NSXMLNode*)node
|
- (void) replaceChildAtIndex: (NSUInteger)index withNode: (NSXMLNode*)node
|
||||||
|
@ -409,6 +406,7 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/*
|
||||||
@implementation NSXMLDocument (NSXMLParserDelegate)
|
@implementation NSXMLDocument (NSXMLParserDelegate)
|
||||||
|
|
||||||
- (void) parser: (NSXMLParser *)parser
|
- (void) parser: (NSXMLParser *)parser
|
||||||
|
@ -453,3 +451,4 @@ foundCharacters: (NSString *)string
|
||||||
[currentElement setStringValue: string];
|
[currentElement setStringValue: string];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
*/
|
||||||
|
|
|
@ -41,12 +41,10 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
{
|
{
|
||||||
if (GS_EXISTS_INTERNAL && _internal != nil)
|
if (GS_EXISTS_INTERNAL && _internal != nil)
|
||||||
{
|
{
|
||||||
while (internal->childCount > 0)
|
while ([self childCount] > 0)
|
||||||
{
|
{
|
||||||
[self removeChildAtIndex: internal->childCount - 1];
|
[self removeChildAtIndex: [self childCount] - 1];
|
||||||
}
|
}
|
||||||
[internal->attributes release];
|
|
||||||
[internal->namespaces release];
|
|
||||||
}
|
}
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
@ -152,7 +150,7 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
NSEnumerator *en = [attributes keyEnumerator];
|
NSEnumerator *en = [attributes keyEnumerator];
|
||||||
NSString *key;
|
NSString *key;
|
||||||
|
|
||||||
[internal->attributes removeAllObjects];
|
// [internal->attributes removeAllObjects];
|
||||||
while ((key = [en nextObject]) != nil)
|
while ((key = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
NSString *val = [attributes objectForKey: key];
|
NSString *val = [attributes objectForKey: key];
|
||||||
|
@ -164,12 +162,14 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
|
|
||||||
- (NSArray*) attributes
|
- (NSArray*) attributes
|
||||||
{
|
{
|
||||||
return [internal->attributes allValues];
|
[self notImplemented: _cmd];
|
||||||
|
return nil; // [internal->attributes allValues];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSXMLNode*) attributeForName: (NSString*)name
|
- (NSXMLNode*) attributeForName: (NSString*)name
|
||||||
{
|
{
|
||||||
return [internal->attributes objectForKey: name];
|
[self notImplemented: _cmd];
|
||||||
|
return nil; // [internal->attributes objectForKey: name];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSXMLNode*) attributeForLocalName: (NSString*)localName
|
- (NSXMLNode*) attributeForLocalName: (NSString*)localName
|
||||||
|
@ -205,7 +205,8 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
|
|
||||||
- (NSArray*) namespaces
|
- (NSArray*) namespaces
|
||||||
{
|
{
|
||||||
return internal->namespaces;
|
[self notImplemented: _cmd];
|
||||||
|
return nil; // internal->namespaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSXMLNode*) namespaceForPrefix: (NSString*)name
|
- (NSXMLNode*) namespaceForPrefix: (NSString*)name
|
||||||
|
@ -229,13 +230,16 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
- (void) insertChild: (NSXMLNode*)child atIndex: (NSUInteger)index
|
||||||
{
|
{
|
||||||
NSXMLNodeKind kind;
|
NSXMLNodeKind kind;
|
||||||
xmlNodePtr node = (xmlNodePtr)(internal->node);
|
NSXMLNode *next = nil;
|
||||||
|
xmlNodePtr nextNode = NULL;
|
||||||
|
xmlNodePtr newNode = NULL;
|
||||||
|
xmlNodePtr prevNode = NULL;
|
||||||
|
|
||||||
|
// Check to make sure this is a valid addition...
|
||||||
NSAssert(nil != child, NSInvalidArgumentException);
|
NSAssert(nil != child, NSInvalidArgumentException);
|
||||||
NSAssert(index <= internal->childCount, NSInvalidArgumentException);
|
NSAssert(index <= [self childCount], NSInvalidArgumentException);
|
||||||
NSAssert(nil == [child parent], NSInternalInconsistencyException);
|
NSAssert(nil == [child parent], NSInvalidArgumentException);
|
||||||
kind = [child kind];
|
kind = [child kind];
|
||||||
// FIXME ... should we check for valid kinds rather than invalid ones?
|
|
||||||
NSAssert(NSXMLAttributeKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLAttributeKind != kind, NSInvalidArgumentException);
|
||||||
NSAssert(NSXMLDTDKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLDTDKind != kind, NSInvalidArgumentException);
|
||||||
NSAssert(NSXMLDocumentKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLDocumentKind != kind, NSInvalidArgumentException);
|
||||||
|
@ -245,14 +249,19 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
NSAssert(NSXMLNamespaceKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLNamespaceKind != kind, NSInvalidArgumentException);
|
||||||
NSAssert(NSXMLNotationDeclarationKind != kind, NSInvalidArgumentException);
|
NSAssert(NSXMLNotationDeclarationKind != kind, NSInvalidArgumentException);
|
||||||
|
|
||||||
if (nil == internal->children)
|
// Get all of the nodes...
|
||||||
{
|
newNode = ((xmlNodePtr)[child _node]);
|
||||||
internal->children = [[NSMutableArray alloc] initWithCapacity: 10];
|
next = [self childAtIndex: index];
|
||||||
}
|
nextNode = ((xmlNodePtr)[next _node]);
|
||||||
[internal->children insertObject: child
|
prevNode = nextNode->prev;
|
||||||
atIndex: index];
|
|
||||||
|
// Make all of the links...
|
||||||
|
prevNode->next = newNode;
|
||||||
|
newNode->next = nextNode;
|
||||||
|
newNode->prev = prevNode;
|
||||||
|
nextNode->prev = newNode;
|
||||||
|
|
||||||
GSIVar(child, parent) = self;
|
GSIVar(child, parent) = self;
|
||||||
internal->childCount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
- (void) insertChildren: (NSArray*)children atIndex: (NSUInteger)index
|
||||||
|
@ -284,22 +293,17 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
|
|
||||||
- (void) setChildren: (NSArray*)children
|
- (void) setChildren: (NSArray*)children
|
||||||
{
|
{
|
||||||
if (children != internal->children)
|
NSEnumerator *en;
|
||||||
{
|
NSXMLNode *child;
|
||||||
NSEnumerator *en;
|
|
||||||
NSXMLNode *child;
|
|
||||||
|
|
||||||
[children retain];
|
while ([self childCount] > 0)
|
||||||
while (internal->childCount > 0)
|
{
|
||||||
{
|
[self removeChildAtIndex: [self childCount] - 1];
|
||||||
[self removeChildAtIndex:internal->childCount - 1];
|
}
|
||||||
}
|
en = [[self children] objectEnumerator];
|
||||||
en = [children objectEnumerator];
|
while ((child = [en nextObject]) != nil)
|
||||||
while ((child = [en nextObject]) != nil)
|
{
|
||||||
{
|
[self insertChild: child atIndex: [self childCount]];
|
||||||
[self insertChild: child atIndex: internal->childCount];
|
|
||||||
}
|
|
||||||
[children release];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +330,7 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
NSEnumerator *en;
|
NSEnumerator *en;
|
||||||
id obj;
|
id obj;
|
||||||
|
|
||||||
en = [internal->namespaces objectEnumerator];
|
en = [[self namespaces] objectEnumerator];
|
||||||
while ((obj = [en nextObject]) != nil)
|
while ((obj = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
NSXMLNode *ns = [obj copyWithZone: zone];
|
NSXMLNode *ns = [obj copyWithZone: zone];
|
||||||
|
@ -335,7 +339,7 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
[ns release];
|
[ns release];
|
||||||
}
|
}
|
||||||
|
|
||||||
en = [internal->attributes objectEnumerator];
|
en = [[self attributes] objectEnumerator];
|
||||||
while ((obj = [en nextObject]) != nil)
|
while ((obj = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
NSXMLNode *attr = [obj copyWithZone: zone];
|
NSXMLNode *attr = [obj copyWithZone: zone];
|
||||||
|
@ -344,7 +348,7 @@ GS_PRIVATE_INTERNAL(NSXMLElement)
|
||||||
[attr release];
|
[attr release];
|
||||||
}
|
}
|
||||||
|
|
||||||
en = [internal->children objectEnumerator];
|
en = [[self children] objectEnumerator];
|
||||||
while ((obj = [en nextObject]) != nil)
|
while ((obj = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
NSXMLNode *child = [obj copyWithZone: zone];
|
NSXMLNode *child = [obj copyWithZone: zone];
|
||||||
|
|
|
@ -97,8 +97,8 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
{
|
{
|
||||||
case(NSXMLAttributeKind):
|
case(NSXMLAttributeKind):
|
||||||
node = xmlNewProp(NULL,
|
node = xmlNewProp(NULL,
|
||||||
XMLSTRING([object name]),
|
(xmlChar *)XMLSTRING([object name]),
|
||||||
XMLSTRING([object stringValue]));
|
(xmlChar *)XMLSTRING([object stringValue]));
|
||||||
break;
|
break;
|
||||||
case(NSXMLElementKind):
|
case(NSXMLElementKind):
|
||||||
node = xmlNewNode(NULL,XMLSTRING([object name]));
|
node = xmlNewNode(NULL,XMLSTRING([object name]));
|
||||||
|
@ -123,12 +123,14 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
stringValue: (NSString*)stringValue
|
stringValue: (NSString*)stringValue
|
||||||
{
|
{
|
||||||
NSXMLNode *n;
|
NSXMLNode *n;
|
||||||
xmlAttrPtr node;
|
xmlAttrPtr node = xmlNewProp(NULL,
|
||||||
|
XMLSTRING(name),
|
||||||
|
XMLSTRING(stringValue));
|
||||||
|
|
||||||
n = [[[self alloc] initWithKind: NSXMLAttributeKind] autorelease];
|
n = [[[self alloc] initWithKind: NSXMLAttributeKind] autorelease];
|
||||||
[n setStringValue: stringValue];
|
[n setStringValue: stringValue];
|
||||||
[n setName: name];
|
[n setName: name];
|
||||||
[n _setNode: node];
|
[n _setNode: (void *)node];
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
@ -366,7 +368,7 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
|
|
||||||
- (NSUInteger) hash
|
- (NSUInteger) hash
|
||||||
{
|
{
|
||||||
return [internal->name hash];
|
return [StringFromXMLStringPtr(MY_NODE->name) hash];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSUInteger) index
|
- (NSUInteger) index
|
||||||
|
@ -478,7 +480,7 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
c = [other children];
|
c = [other children];
|
||||||
if (c != internal->children && NO == [c isEqual: internal->children])
|
if (c != [self children] && NO == [c isEqual: [self children]])
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
@ -525,14 +527,14 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
NSXMLNode *candidate = nil;
|
NSXMLNode *candidate = nil;
|
||||||
|
|
||||||
/* Node walking is a depth-first thingy. Hence, we consider children first: */
|
/* Node walking is a depth-first thingy. Hence, we consider children first: */
|
||||||
if (0 != internal->childCount)
|
if (0 != [self childCount])
|
||||||
{
|
{
|
||||||
NSUInteger theIndex = 0;
|
NSUInteger theIndex = 0;
|
||||||
if (NO == forward)
|
if (NO == forward)
|
||||||
{
|
{
|
||||||
theIndex = (internal->childCount) - 1;
|
theIndex = ([self childCount]) - 1;
|
||||||
}
|
}
|
||||||
candidate = [internal->children objectAtIndex: theIndex];
|
candidate = [[self children] objectAtIndex: theIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If there are no children, we move on to siblings: */
|
/* If there are no children, we move on to siblings: */
|
||||||
|
@ -586,7 +588,14 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
|
|
||||||
- (NSXMLNode*) nextSibling
|
- (NSXMLNode*) nextSibling
|
||||||
{
|
{
|
||||||
return internal->nextSibling;
|
xmlNodePtr node = MY_NODE->next;
|
||||||
|
|
||||||
|
if(node != NULL)
|
||||||
|
{
|
||||||
|
return node->next->_private;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) objectValue
|
- (id) objectValue
|
||||||
|
@ -691,7 +700,7 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
|
|
||||||
- (void) setStringValue: (NSString*)string resolvingEntities: (BOOL)resolve
|
- (void) setStringValue: (NSString*)string resolvingEntities: (BOOL)resolve
|
||||||
{
|
{
|
||||||
xmlNodePtr node = (xmlNodePtr)(internal->node);
|
xmlNodePtr node = MY_NODE;
|
||||||
if (resolve == NO)
|
if (resolve == NO)
|
||||||
{
|
{
|
||||||
node->content = (xmlChar *)[string UTF8String];
|
node->content = (xmlChar *)[string UTF8String];
|
||||||
|
@ -701,7 +710,7 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
||||||
// need to actually resolve entities...
|
// need to actually resolve entities...
|
||||||
node->content = (xmlChar *)[string UTF8String];
|
node->content = (xmlChar *)[string UTF8String];
|
||||||
}
|
}
|
||||||
if (nil == internal->stringValue)
|
if (nil == string)
|
||||||
{
|
{
|
||||||
node->content = (xmlChar *)[@"" UTF8String]; // string value may not be nil
|
node->content = (xmlChar *)[@"" UTF8String]; // string value may not be nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,13 +132,9 @@ StringFromXMLString(const unsigned char *bytes, unsigned length)
|
||||||
*/
|
*/
|
||||||
#define GS_NSXMLDocument_IVARS SUPERIVARS(GS_NSXMLNode_IVARS) \
|
#define GS_NSXMLDocument_IVARS SUPERIVARS(GS_NSXMLNode_IVARS) \
|
||||||
NSXMLDTD *docType; \
|
NSXMLDTD *docType; \
|
||||||
BOOL childrenHaveMutated; \
|
|
||||||
NSXMLElement *rootElement; \
|
|
||||||
NSString *MIMEType; \
|
NSString *MIMEType; \
|
||||||
NSUInteger fidelityMask; \
|
NSUInteger fidelityMask; \
|
||||||
NSInteger contentKind; \
|
NSInteger contentKind; \
|
||||||
NSMutableArray *elementStack; \
|
|
||||||
NSData *xmlData; \
|
|
||||||
|
|
||||||
|
|
||||||
/* Instance variables for NSXMLDTD with/without the instance
|
/* Instance variables for NSXMLDTD with/without the instance
|
||||||
|
@ -149,8 +145,6 @@ StringFromXMLString(const unsigned char *bytes, unsigned length)
|
||||||
#define GS_NSXMLDTD_IVARS SUPERIVARS(GS_NSXMLNode_IVARS) \
|
#define GS_NSXMLDTD_IVARS SUPERIVARS(GS_NSXMLNode_IVARS) \
|
||||||
NSString *publicID; \
|
NSString *publicID; \
|
||||||
NSString *systemID; \
|
NSString *systemID; \
|
||||||
BOOL childrenHaveMutated; \
|
|
||||||
BOOL modified; \
|
|
||||||
NSMutableDictionary *entities; \
|
NSMutableDictionary *entities; \
|
||||||
NSMutableDictionary *elements; \
|
NSMutableDictionary *elements; \
|
||||||
NSMutableDictionary *notations; \
|
NSMutableDictionary *notations; \
|
||||||
|
@ -175,12 +169,7 @@ StringFromXMLString(const unsigned char *bytes, unsigned length)
|
||||||
* This macro needs to be defined before the NSXMLElement.h header
|
* This macro needs to be defined before the NSXMLElement.h header
|
||||||
* is imported and before GSInternal.h is imported.
|
* is imported and before GSInternal.h is imported.
|
||||||
*/
|
*/
|
||||||
#define GS_NSXMLElement_IVARS SUPERIVARS(GS_NSXMLNode_IVARS) \
|
#define GS_NSXMLElement_IVARS SUPERIVARS(GS_NSXMLNode_IVARS)
|
||||||
NSMutableDictionary *attributes; \
|
|
||||||
NSMutableArray *namespaces; \
|
|
||||||
BOOL childrenHaveMutated; \
|
|
||||||
NSInteger prefixIndex; \
|
|
||||||
|
|
||||||
|
|
||||||
#import "Foundation/NSArray.h"
|
#import "Foundation/NSArray.h"
|
||||||
#import "Foundation/NSData.h"
|
#import "Foundation/NSData.h"
|
||||||
|
|
Loading…
Reference in a new issue