aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportFileUtilities.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-11-04 16:10:33 +0000
committerstuconnolly <stuart02@gmail.com>2010-11-04 16:10:33 +0000
commit286d4ef211a7ab3e9564bbe6a099021e0064c941 (patch)
treeca94de4210172d8315c616bb2447db855fe4d979 /Source/SPExportFileUtilities.m
parent970535298acfe00937792e4e7d9d03b51fc26f76 (diff)
downloadsequelpro-286d4ef211a7ab3e9564bbe6a099021e0064c941.tar.gz
sequelpro-286d4ef211a7ab3e9564bbe6a099021e0064c941.tar.bz2
sequelpro-286d4ef211a7ab3e9564bbe6a099021e0064c941.zip
Start moving towards using the same XML format as MySQL uses. The inclusion of the query executed for filtered and query results as well as the table structure when exporting entire tables still needs to be added. Part of issue #840.
Diffstat (limited to 'Source/SPExportFileUtilities.m')
-rw-r--r--Source/SPExportFileUtilities.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index 2688b369..fd4be8b0 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -86,9 +86,13 @@
[header appendFormat:@"- %@: %@\n", NSLocalizedString(@"Database", @"export header database label"), [tableDocumentInstance database]];
[header appendFormat:@"- %@ Time: %@\n", NSLocalizedString(@"Generation Time", @"export header generation time label"), [NSDate date]];
[header appendString:@"-\n-->\n\n"];
+ [header appendFormat:@"<%@ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n", (exportSource == SPTableExport) ? @"mysqldump" : @"resultset"];
if (exportSource == SPTableExport) {
- [header appendFormat:@"<%@>\n\n", [[tableDocumentInstance database] HTMLEscapeString]];
+ [header appendFormat:@"<database name=\"%@\">\n\n", [tableDocumentInstance database]];
+ }
+ else {
+ [header appendString:@"\n"];
}
[file writeData:[header dataUsingEncoding:NSUTF8StringEncoding]];