@@ -117,14 +117,16 @@ + (instancetype)elementWithXMLString: (OFString*)string { return [[[self alloc] initWithXMLString: string] autorelease]; } +#ifdef OF_HAVE_FILES + (instancetype)elementWithFile: (OFString*)path { return [[[self alloc] initWithFile: path] autorelease]; } +#endif - init { OF_INVALID_INIT_METHOD } @@ -234,10 +236,11 @@ objc_autoreleasePoolPop(pool); return self; } +#ifdef OF_HAVE_FILES - initWithFile: (OFString*)path { void *pool; OFXMLParser *parser; OFXMLElementBuilder *builder; @@ -264,10 +267,11 @@ objc_autoreleasePoolPop(pool); return self; } +#endif - initWithSerialization: (OFXMLElement*)element { self = [super init];