From 966ee1615e16bf1e4864d61d5346296d546f6227 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 21 Nov 2015 03:47:44 +0100 Subject: Move some shared code to the parent class --- Source/SPXMLExporter.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/SPXMLExporter.m') diff --git a/Source/SPXMLExporter.m b/Source/SPXMLExporter.m index 39e89287..e1142d3a 100644 --- a/Source/SPXMLExporter.m +++ b/Source/SPXMLExporter.m @@ -157,7 +157,7 @@ [xmlString appendFormat:@"\t\n\n", [self xmlTableName]]; } - [[self exportOutputFile] writeData:[xmlString dataUsingEncoding:[self exportOutputEncoding]]]; + [self writeString:xmlString]; } else { totalRows = [[self xmlDataArray] count]; @@ -179,7 +179,7 @@ // If required, write an opening tag in the form of the table name if ([self xmlFormat] == SPXMLExportPlainFormat) { - [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"\t<%@>\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"] dataUsingEncoding:[self exportOutputEncoding]]]; + [self writeString:[NSString stringWithFormat:@"\t<%@>\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"]]; } // Set up the starting row, which is 0 for streaming result sets and @@ -295,7 +295,7 @@ currentPoolDataLength += [xmlString length]; // Write the row to the filehandle - [[self exportOutputFile] writeData:[xmlString dataUsingEncoding:[self exportOutputEncoding]]]; + [self writeString:xmlString]; // Update the progress counter and progress bar currentRowIndex++; @@ -324,10 +324,10 @@ } if (([self xmlFormat] == SPXMLExportMySQLFormat) && isTableExport) { - [[self exportOutputFile] writeData:[@"\t\n\n" dataUsingEncoding:[self exportOutputEncoding]]]; + [self writeString:@"\t\n\n"]; } else if ([self xmlFormat] == SPXMLExportPlainFormat) { - [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"\t\n\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"] dataUsingEncoding:[self exportOutputEncoding]]]; + [self writeString:[NSString stringWithFormat:@"\t\n\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"]]; } [xmlExportPool release]; -- cgit v1.2.3