diff options
author | stuconnolly <stuart02@gmail.com> | 2010-11-04 16:10:33 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-11-04 16:10:33 +0000 |
commit | 286d4ef211a7ab3e9564bbe6a099021e0064c941 (patch) | |
tree | ca94de4210172d8315c616bb2447db855fe4d979 /Source/SPXMLExporterDelegate.m | |
parent | 970535298acfe00937792e4e7d9d03b51fc26f76 (diff) | |
download | sequelpro-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/SPXMLExporterDelegate.m')
-rw-r--r-- | Source/SPXMLExporterDelegate.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m index 12274a4b..cae852ac 100644 --- a/Source/SPXMLExporterDelegate.m +++ b/Source/SPXMLExporterDelegate.m @@ -69,7 +69,7 @@ // If we're exporting to multiple files then close the file handle of the exporter // that just finished, ensuring its data is written to disk. if (exportToMultipleFiles) { - [[exporter exportOutputFile] writeData:[[NSString stringWithFormat:@"</%@>\n", [[tableDocumentInstance database] HTMLEscapeString]] dataUsingEncoding:[connection stringEncoding]]]; + [[exporter exportOutputFile] writeData:[(exportSource == SPTableExport) ? @"</database>\n</mysqldump>\n" : @"</resultset>\n" dataUsingEncoding:[connection stringEncoding]]]; [[exporter exportOutputFile] close]; } @@ -82,9 +82,7 @@ } // Otherwise if the exporter list is empty, close the progress sheet else { - if (exportSource == SPTableExport) { - [[exporter exportOutputFile] writeData:[[NSString stringWithFormat:@"</%@>\n", [[tableDocumentInstance database] HTMLEscapeString]] dataUsingEncoding:[connection stringEncoding]]]; - } + [[exporter exportOutputFile] writeData:[(exportSource == SPTableExport) ? @"</database>\n</mysqldump>\n" : @"</resultset>\n" dataUsingEncoding:[connection stringEncoding]]]; // Close the last exporter's file handle [[exporter exportOutputFile] close]; |