mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
* Source/NSXMLDTDNode.m: Correct node type, at least for entity nodes.
* Source/NSXMLDTD.m: Use predefined entities from libxml2. * Source/NSXMLNode.m: Rewrite the ownership transfer to preserve names in dictionaries. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34947 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fbccdda56f
commit
1919becb37
4 changed files with 88 additions and 62 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
#import "common.h"
|
||||
|
||||
#define GS_XMLNODETYPE xmlDtd
|
||||
#define GS_XMLNODETYPE xmlEntity
|
||||
#define GSInternal NSXMLDTDNodeInternal
|
||||
|
||||
#import "NSXMLPrivate.h"
|
||||
|
@ -69,11 +69,21 @@ GS_PRIVATE_INTERNAL(NSXMLDTDNode)
|
|||
|
||||
- (id) initWithXMLString: (NSString*)string
|
||||
{
|
||||
// internal->node = xmlNewDtd(NULL,NULL,NULL);
|
||||
// TODO: Parse the string and get the info to create this...
|
||||
NSXMLDTDNode *result = nil;
|
||||
NSError *error;
|
||||
NSXMLDocument *tempDoc =
|
||||
[[NSXMLDocument alloc] initWithXMLString: string
|
||||
options: 0
|
||||
error: &error];
|
||||
if (tempDoc != nil)
|
||||
{
|
||||
result = RETAIN([tempDoc rootElement]);
|
||||
[result detach]; // detach from document.
|
||||
}
|
||||
[tempDoc release];
|
||||
[self release];
|
||||
|
||||
[self notImplemented: _cmd];
|
||||
return nil;
|
||||
return result;
|
||||
}
|
||||
|
||||
- (BOOL) isExternal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue