mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
* Source/GSXML.m|.h ([GSXMLDocument -stringValue]): dump document in a
string. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8671 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d9aa48db1
commit
b987758597
3 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-01-17 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||
|
||||
* Source/GSXML.m|.h ([GSXMLDocument -stringValue]): dump document in a
|
||||
string.
|
||||
|
||||
Wed Jan 17 16:46:09 2001 Nicola Pero <nicola@brainstorm.co.uk>
|
||||
|
||||
* GNUmakefile: Added PACKAGE_NEEDS_CONFIGURE and
|
||||
|
|
|
@ -78,6 +78,8 @@ typedef xmlNsType GSXMLNamespaceType;
|
|||
|
||||
- (void) save: (NSString*) filename;
|
||||
|
||||
- (NSString *) stringValue;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <parserInternals.h>
|
||||
#include <SAX.h>
|
||||
#include <HTMLparser.h>
|
||||
#include <xmlmemory.h>
|
||||
|
||||
#include <Foundation/GSXML.h>
|
||||
#include <Foundation/NSData.h>
|
||||
|
@ -241,6 +242,23 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
|||
xmlSaveFile([filename cString], lib);
|
||||
}
|
||||
|
||||
- (NSString *) stringValue
|
||||
{
|
||||
NSString *string = nil;
|
||||
xmlChar *buf = NULL;
|
||||
int length;
|
||||
|
||||
xmlDocDumpMemory(lib, &buf, &length);
|
||||
|
||||
if(buf && length)
|
||||
{
|
||||
string = [NSString_class stringWithCString: buf length: length];
|
||||
xmlFree(buf);
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation GSXMLNamespace : NSObject
|
||||
|
|
Loading…
Reference in a new issue