summaryrefslogtreecommitdiffstats
path: root/Plugins/XmlExport
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2014-12-06 17:33:25 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2014-12-06 17:33:25 -0500
commit7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch)
treea35c14143716e1f2c98f808c81f89426045a946f /Plugins/XmlExport
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'Plugins/XmlExport')
-rw-r--r--Plugins/XmlExport/XmlExport.pro27
-rw-r--r--Plugins/XmlExport/XmlExport.ui151
-rw-r--r--Plugins/XmlExport/xmlexport.cpp468
-rw-r--r--Plugins/XmlExport/xmlexport.h75
-rw-r--r--Plugins/XmlExport/xmlexport.json7
-rw-r--r--Plugins/XmlExport/xmlexport.qrc5
-rw-r--r--Plugins/XmlExport/xmlexport_global.h12
7 files changed, 745 insertions, 0 deletions
diff --git a/Plugins/XmlExport/XmlExport.pro b/Plugins/XmlExport/XmlExport.pro
new file mode 100644
index 0000000..87e0c7f
--- /dev/null
+++ b/Plugins/XmlExport/XmlExport.pro
@@ -0,0 +1,27 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2014-06-15T05:20:57
+#
+#-------------------------------------------------
+
+include($$PWD/../../SQLiteStudio3/plugins.pri)
+
+QT -= gui
+
+TARGET = XmlExport
+TEMPLATE = lib
+
+DEFINES += XMLEXPORT_LIBRARY
+
+SOURCES += xmlexport.cpp
+
+HEADERS += xmlexport.h\
+ xmlexport_global.h
+
+FORMS += XmlExport.ui
+
+OTHER_FILES += \
+ xmlexport.json
+
+RESOURCES += \
+ xmlexport.qrc
diff --git a/Plugins/XmlExport/XmlExport.ui b/Plugins/XmlExport/XmlExport.ui
new file mode 100644
index 0000000..2a236c6
--- /dev/null
+++ b/Plugins/XmlExport/XmlExport.ui
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>XmlExportConfig</class>
+ <widget class="QWidget" name="XmlExportConfig">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>325</width>
+ <height>280</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QGroupBox" name="formatGroup">
+ <property name="title">
+ <string>Output format</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0" colspan="2">
+ <widget class="ConfigRadioButton" name="formatRadio">
+ <property name="text">
+ <string>Format document (new lines, indentation)</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string>format</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Format</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <widget class="ConfigRadioButton" name="compressRadio">
+ <property name="text">
+ <string>Compress (everything in one line)</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string>compress</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Format</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="charEscapingGroup">
+ <property name="title">
+ <string>Special characters escaping</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="ConfigRadioButton" name="mixedRadio">
+ <property name="toolTip">
+ <string>&lt;p&gt;Ampersands will be used for shorter values and CDATA will be used for larger values. This applies only to values that require character escaping. Other values will be exported as they are.&lt;/p&gt;</string>
+ </property>
+ <property name="text">
+ <string>Use CDATA and ampersands</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string>mixed</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Escaping</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="ConfigRadioButton" name="cdataRadio">
+ <property name="toolTip">
+ <string>&lt;p&gt;Every value requiring character escepe will be enclosed in CDATA block.&lt;/p&gt;</string>
+ </property>
+ <property name="text">
+ <string>Always use CDATA</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string>cdata</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Escaping</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="ConfigRadioButton" name="ampRadio">
+ <property name="toolTip">
+ <string>&lt;p&gt;Every character that require esceping will be replaced with its ampersand escape sequence. No CDATA blocks will be used.&lt;/p&gt;</string>
+ </property>
+ <property name="text">
+ <string>Always use ampersand</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string>ampersand</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Escaping</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="namespaceGroup">
+ <property name="title">
+ <string>Define XML namespace</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>XmlExport.UseNamespace</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="namespaceEdit">
+ <property name="cfg" stdset="0">
+ <string>XmlExport.Namespace</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>ConfigRadioButton</class>
+ <extends>QRadioButton</extends>
+ <header>common/configradiobutton.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/Plugins/XmlExport/xmlexport.cpp b/Plugins/XmlExport/xmlexport.cpp
new file mode 100644
index 0000000..746d246
--- /dev/null
+++ b/Plugins/XmlExport/xmlexport.cpp
@@ -0,0 +1,468 @@
+#include "xmlexport.h"
+#include "services/exportmanager.h"
+#include "common/unused.h"
+#include <QTextCodec>
+
+const QString XmlExport::docBegin = QStringLiteral("<?xml version=\"1.0\" encoding=\"%1\"?>\n");
+
+XmlExport::XmlExport()
+{
+}
+
+QString XmlExport::getFormatName() const
+{
+ return QStringLiteral("XML");
+}
+
+ExportManager::StandardConfigFlags XmlExport::standardOptionsToEnable() const
+{
+ return ExportManager::CODEC;
+}
+
+QString XmlExport::getExportConfigFormName() const
+{
+ return QStringLiteral("XmlExportConfig");
+}
+
+CfgMain* XmlExport::getConfig()
+{
+ return &cfg;
+}
+
+void XmlExport::validateOptions()
+{
+ bool useNs = cfg.XmlExport.UseNamespace.get();
+ EXPORT_MANAGER->updateVisibilityAndEnabled(cfg.XmlExport.Namespace, true, useNs);
+
+ bool nsValid = !useNs || !cfg.XmlExport.Namespace.get().isEmpty();
+ EXPORT_MANAGER->handleValidationFromPlugin(nsValid, cfg.XmlExport.Namespace, tr("Enter the namespace to use (for example: http://my.namespace.org"));
+}
+
+QString XmlExport::defaultFileExtension() const
+{
+ return QStringLiteral("xml");
+}
+
+bool XmlExport::beforeExportQueryResults(const QString& query, QList<QueryExecutor::ResultColumnPtr>& columns, const QHash<ExportManager::ExportProviderFlag, QVariant> providedData)
+{
+ UNUSED(providedData);
+
+ setupConfig();
+
+ write(docBegin.arg(codecName));
+
+ writeln(QString("<results%2>").arg(nsStr));
+ incrIndent();
+
+ writeln("<query>");
+ incrIndent();
+ writeln(escape(query));
+ decrIndent();
+ writeln("</query>");
+
+ QList<DataType> columnTypes = QueryExecutor::resolveColumnTypes(db, columns, true);
+ writeln("<columns>");
+ incrIndent();
+ int i = 0;
+ DataType type;
+ for (QueryExecutor::ResultColumnPtr col : columns)
+ {
+ type = columnTypes[i];
+
+ writeln("<column>");
+ incrIndent();
+ writeln("<displayName>"+ escape(col->displayName) + "</displayName>");
+ writeln("<name>"+ escape(col->column) + "</name>");
+ writeln("<table>"+ escape(col->table) + "</table>");
+ writeln("<database>"+ escape(col->database) + "</database>");
+ writeln("<type>"+ escape(type.toFullTypeString()) + "</type>");
+ decrIndent();
+ writeln("</column>");
+ i++;
+ }
+ decrIndent();
+ writeln("</columns>");
+
+ writeln("<rows>");
+ incrIndent();
+ return true;
+}
+
+bool XmlExport::exportQueryResultsRow(SqlResultsRowPtr row)
+{
+ static const QString rowTpl = QStringLiteral("<value column=\"%1\">%2</value>");
+ static const QString nullTpl = QStringLiteral("<value column=\"%1\" null=\"true\"/>");
+
+ writeln("<row>");
+ incrIndent();
+
+ int i = 0;
+ for (const QVariant& value : row->valueList())
+ {
+ if (value.isNull())
+ writeln(nullTpl.arg(i));
+ else
+ writeln(rowTpl.arg(i).arg(escape(value.toString())));
+ }
+
+ decrIndent();
+ writeln("</row>");
+ return true;
+}
+
+bool XmlExport::afterExportQueryResults()
+{
+ decrIndent();
+ write("</rows>");
+ decrIndent();
+ write("</results>");
+ return true;
+}
+
+bool XmlExport::exportTable(const QString& database, const QString& table, const QStringList& columnNames, const QString& ddl, SqliteCreateTablePtr createTable, const QHash<ExportManager::ExportProviderFlag, QVariant> providedData)
+{
+ UNUSED(columnNames);
+ UNUSED(providedData);
+ if (isTableExport())
+ {
+ setupConfig();
+ write(docBegin.arg(codecName));
+ }
+
+ writeln(QString("<table%1>").arg(isTableExport() ? nsStr : ""));
+ incrIndent();
+
+ writeln("<database>" + escape(database) + "</database>");
+ writeln("<name>" + escape(table) + "</name>");
+ if (!createTable->withOutRowId.isNull())
+ writeln(QString("<withoutRowId>true</withoutRowId>"));
+
+ writeln("<ddl>" + escape(ddl) + "</ddl>");
+
+ writeln("<columns>");
+ incrIndent();
+ for (SqliteCreateTable::Column* col : createTable->columns)
+ {
+ writeln("<column>");
+ incrIndent();
+ writeln("<name>"+ col->name + "</name>");
+ writeln(QString("<type>%1</type>").arg((col->type ? col->type->toDataType().toFullTypeString() : "")));
+ if (col->constraints.size() > 0)
+ {
+ writeln("<constraints>");
+ incrIndent();
+ for (SqliteCreateTable::Column::Constraint* constr : col->constraints)
+ {
+ writeln("<constraint>");
+ incrIndent();
+ writeln("<type>" + constr->typeString() + "</type>");
+ writeln("<definition>" + constr->detokenize() + "</definition>");
+ decrIndent();
+ writeln("</constraint>");
+ }
+ decrIndent();
+ writeln("</constraints>");
+ }
+ decrIndent();
+ writeln("</column>");
+ }
+ decrIndent();
+ writeln("</columns>");
+
+ if (createTable->constraints.size() > 0)
+ {
+ writeln("<constraints>");
+ incrIndent();
+ for (SqliteCreateTable::Constraint* constr : createTable->constraints)
+ {
+ writeln("<constraint>");
+ incrIndent();
+ writeln("<type>" + constr->typeString() + "</type>");
+ writeln("<definition>" + constr->detokenize() + "</definition>");
+ decrIndent();
+ writeln("</constraint>");
+ }
+ decrIndent();
+ writeln("</constraints>");
+ }
+
+ writeln("<rows>");
+ incrIndent();
+ return true;
+}
+
+bool XmlExport::exportVirtualTable(const QString& database, const QString& table, const QStringList& columnNames, const QString& ddl, SqliteCreateVirtualTablePtr createTable, const QHash<ExportManager::ExportProviderFlag, QVariant> providedData)
+{
+ UNUSED(providedData);
+
+ if (isTableExport())
+ {
+ setupConfig();
+ write(docBegin.arg(codecName));
+ }
+
+ writeln(QString("<table%1>").arg(isTableExport() ? nsStr : ""));
+ incrIndent();
+
+ writeln("<database>" + escape(database) + "</database>");
+ writeln("<name>" + escape(table) + "</name>");
+ writeln("<virtual>true</name>");
+ writeln("<module>" + escape(createTable->module) + "</module>");
+
+ writeln("<ddl>" + escape(ddl) + "</ddl>");
+
+ writeln("<columns>");
+ incrIndent();
+ for (const QString& col : columnNames)
+ {
+ writeln("<column>");
+ incrIndent();
+ writeln("<name>"+ col + "</name>");
+ decrIndent();
+ writeln("</column>");
+ }
+ decrIndent();
+ writeln("</columns>");
+
+ if (createTable->args.size() > 0)
+ {
+ writeln("<moduleArgs>");
+ incrIndent();
+ for (const QString& arg : createTable->args)
+ writeln("<arg>" + arg + "</arg>");
+
+ decrIndent();
+ writeln("</moduleArgs>");
+ }
+
+ writeln("<rows>");
+ incrIndent();
+ return true;
+}
+
+bool XmlExport::exportTableRow(SqlResultsRowPtr data)
+{
+ return exportQueryResultsRow(data);
+}
+
+bool XmlExport::afterExportTable()
+{
+ decrIndent();
+ writeln("</rows>");
+ decrIndent();
+ writeln("</table>");
+ return true;
+}
+
+bool XmlExport::beforeExportDatabase(const QString& database)
+{
+ setupConfig();
+ write(docBegin.arg(codecName));
+
+ writeln(QString("<database%1>").arg(nsStr));
+ incrIndent();
+ writeln("<name>" + escape(database) + "</name>");
+
+ return true;
+}
+
+bool XmlExport::exportIndex(const QString& database, const QString& name, const QString& ddl, SqliteCreateIndexPtr createIndex)
+{
+ writeln("<index>");
+ incrIndent();
+
+ writeln("<database>" + escape(database) + "</database>");
+ writeln("<name>" + escape(name) + "</name>");
+ if (createIndex->uniqueKw)
+ writeln("<unique>true</unique>");
+
+ if (createIndex->where)
+ writeln("<partial>" + createIndex->where->detokenize() + "</partial>");
+
+ writeln("<ddl>" + escape(ddl) + "</ddl>");
+
+ decrIndent();
+ writeln("</index>");
+ return true;
+}
+
+bool XmlExport::exportTrigger(const QString& database, const QString& name, const QString& ddl, SqliteCreateTriggerPtr createTrigger)
+{
+ UNUSED(createTrigger);
+ writeln("<trigger>");
+ incrIndent();
+
+ writeln("<database>" + escape(database) + "</database>");
+ writeln("<name>" + escape(name) + "</name>");
+ writeln("<ddl>" + escape(ddl) + "</ddl>");
+
+ QString timing = SqliteCreateTrigger::time(createTrigger->eventTime);
+ writeln("<timing>" + escape(timing) + "</timing>");
+
+ QString event = createTrigger->event ? SqliteCreateTrigger::Event::typeToString(createTrigger->event->type) : "";
+ writeln("<action>" + escape(event) + "</action>");
+
+ QString tag;
+ if (createTrigger->eventTime == SqliteCreateTrigger::Time::INSTEAD_OF)
+ tag = "<view>";
+ else
+ tag = "<table>";
+
+ writeln(tag + escape(createTrigger->table) + tag);
+
+ if (createTrigger->precondition)
+ writeln("<precondition>" + escape(createTrigger->precondition->detokenize()) + "</precondition>");
+
+ QStringList queryStrings;
+ for (SqliteQuery* q : createTrigger->queries)
+ queryStrings << q->detokenize();
+
+ writeln("<code>" + escape(queryStrings.join("\n")) + "</code>");
+
+ decrIndent();
+ writeln("</trigger>");
+ return true;
+}
+
+bool XmlExport::exportView(const QString& database, const QString& name, const QString& ddl, SqliteCreateViewPtr createView)
+{
+ UNUSED(createView);
+ writeln("<view>");
+ incrIndent();
+
+ writeln("<database>" + escape(database) + "</database>");
+ writeln("<name>" + escape(name) + "</name>");
+ writeln("<ddl>" + escape(ddl) + "</ddl>");
+ writeln("<select>" + escape(createView->select->detokenize()) + "</select>");
+ decrIndent();
+ writeln("</view>");
+ return true;
+}
+
+bool XmlExport::afterExportDatabase()
+{
+ decrIndent();
+ writeln("</database>");
+ return true;
+}
+
+void XmlExport::setupConfig()
+{
+ codecName = codec->name();
+ indentDepth = 0;
+ newLineStr = "";
+ indentStr = "";
+ indent = (cfg.XmlExport.Format.get() == "format");
+ if (indent)
+ newLineStr = "\n";
+
+ nsStr = QString();
+ if (cfg.XmlExport.UseNamespace.get())
+ nsStr = " xmlns=\"" + cfg.XmlExport.Namespace.get() + "\"";
+
+ if (cfg.XmlExport.Escaping.get() == "ampersand")
+ {
+ useAmpersand = true;
+ useCdata = false;
+ }
+ else if (cfg.XmlExport.Escaping.get() == "cdata")
+ {
+ useAmpersand = false;
+ useCdata = true;
+ }
+ else
+ {
+ useAmpersand = true;
+ useCdata = true;
+ }
+}
+
+void XmlExport::incrIndent()
+{
+ if (indent)
+ {
+ indentDepth++;
+ updateIndent();
+ }
+}
+
+void XmlExport::decrIndent()
+{
+ if (indent)
+ {
+ indentDepth--;
+ updateIndent();
+ }
+}
+
+void XmlExport::updateIndent()
+{
+ indentStr = QString(" ").repeated(indentDepth);
+}
+
+void XmlExport::writeln(const QString& str)
+{
+ QString newStr;
+ if (str.contains("\n"))
+ {
+ QStringList lines = str.split("\n");
+ QMutableStringListIterator it(lines);
+ while (it.hasNext())
+ it.value().prepend(indentStr);
+
+ newStr = lines.join("\n") + newLineStr;
+ }
+ else
+ {
+ newStr = indentStr + str + newLineStr;
+ }
+ GenericExportPlugin::write(newStr);
+}
+
+QString XmlExport::escape(const QString& str)
+{
+ if (useAmpersand && useCdata)
+ {
+ if (str.length() >= minLenghtForCdata)
+ return escapeCdata(str);
+ else
+ return escapeAmpersand(str);
+ }
+ else if (useAmpersand)
+ {
+ return escapeAmpersand(str);
+ }
+ else
+ {
+ return escapeCdata(str);
+ }
+}
+
+QString XmlExport::escapeCdata(const QString& str)
+{
+ if (str.contains('"') || str.contains('&') || str.contains('<') || str.contains('>'))
+ return "<![CDATA[" + str + "]]>";
+
+ return str;
+}
+
+QString XmlExport::escapeAmpersand(const QString& str)
+{
+ return str.toHtmlEscaped();
+}
+
+QString XmlExport::toString(bool value)
+{
+ return value ? "true" : "false";
+}
+
+bool XmlExport::init()
+{
+ Q_INIT_RESOURCE(xmlexport);
+ return GenericExportPlugin::init();
+}
+
+void XmlExport::deinit()
+{
+ Q_CLEANUP_RESOURCE(xmlexport);
+}
diff --git a/Plugins/XmlExport/xmlexport.h b/Plugins/XmlExport/xmlexport.h
new file mode 100644
index 0000000..271a687
--- /dev/null
+++ b/Plugins/XmlExport/xmlexport.h
@@ -0,0 +1,75 @@
+#ifndef XMLEXPORT_H
+#define XMLEXPORT_H
+
+#include "xmlexport_global.h"
+#include "plugins/genericexportplugin.h"
+#include "config_builder.h"
+
+CFG_CATEGORIES(XmlExportConfig,
+ CFG_CATEGORY(XmlExport,
+ CFG_ENTRY(QString, Format, "format")
+ CFG_ENTRY(bool, UseNamespace, false)
+ CFG_ENTRY(QString, Namespace, QString())
+ CFG_ENTRY(QString, Escaping, "mixed")
+ )
+)
+
+class XMLEXPORTSHARED_EXPORT XmlExport : public GenericExportPlugin
+{
+ Q_OBJECT
+ SQLITESTUDIO_PLUGIN("xmlexport.json")
+
+ public:
+ XmlExport();
+
+ QString getFormatName() const;
+ ExportManager::StandardConfigFlags standardOptionsToEnable() const;
+ QString getExportConfigFormName() const;
+ CfgMain* getConfig();
+ void validateOptions();
+ QString defaultFileExtension() const;
+ bool beforeExportQueryResults(const QString& query, QList<QueryExecutor::ResultColumnPtr>& columns,
+ const QHash<ExportManager::ExportProviderFlag,QVariant> providedData);
+ bool exportQueryResultsRow(SqlResultsRowPtr row);
+ bool afterExportQueryResults();
+ bool exportTable(const QString& database, const QString& table, const QStringList& columnNames, const QString& ddl, SqliteCreateTablePtr createTable,
+ const QHash<ExportManager::ExportProviderFlag,QVariant> providedData);
+ bool exportVirtualTable(const QString& database, const QString& table, const QStringList& columnNames, const QString& ddl, SqliteCreateVirtualTablePtr createTable,
+ const QHash<ExportManager::ExportProviderFlag,QVariant> providedData);
+ bool exportTableRow(SqlResultsRowPtr data);
+ bool afterExportTable();
+ bool beforeExportDatabase(const QString& database);
+ bool exportIndex(const QString& database, const QString& name, const QString& ddl, SqliteCreateIndexPtr createIndex);
+ bool exportTrigger(const QString& database, const QString& name, const QString& ddl, SqliteCreateTriggerPtr createTrigger);
+ bool exportView(const QString& database, const QString& name, const QString& ddl, SqliteCreateViewPtr createView);
+ bool afterExportDatabase();
+ bool init();
+ void deinit();
+
+ private:
+ void setupConfig();
+ void incrIndent();
+ void decrIndent();
+ void updateIndent();
+ void writeln(const QString& str);
+ QString escape(const QString& str);
+ QString escapeCdata(const QString& str);
+ QString escapeAmpersand(const QString& str);
+
+ static QString toString(bool value);
+
+ CFG_LOCAL(XmlExportConfig, cfg)
+ bool indent = false;
+ int indentDepth = 0;
+ QString indentStr;
+ QString newLineStr;
+ QString nsStr;
+ QString codecName;
+ bool useAmpersand = true;
+ bool useCdata = true;
+ static const QString docBegin;
+
+ static constexpr int minLenghtForCdata = 100;
+};
+
+#endif // XMLEXPORT_H
diff --git a/Plugins/XmlExport/xmlexport.json b/Plugins/XmlExport/xmlexport.json
new file mode 100644
index 0000000..2432cdd
--- /dev/null
+++ b/Plugins/XmlExport/xmlexport.json
@@ -0,0 +1,7 @@
+{
+ "type": "ExportPlugin",
+ "title": "XML export",
+ "description": "Provides XML format for exporting.",
+ "version": 10000,
+ "author": "SalSoft"
+}
diff --git a/Plugins/XmlExport/xmlexport.qrc b/Plugins/XmlExport/xmlexport.qrc
new file mode 100644
index 0000000..d6a77a6
--- /dev/null
+++ b/Plugins/XmlExport/xmlexport.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/forms">
+ <file>XmlExport.ui</file>
+ </qresource>
+</RCC>
diff --git a/Plugins/XmlExport/xmlexport_global.h b/Plugins/XmlExport/xmlexport_global.h
new file mode 100644
index 0000000..fb1f244
--- /dev/null
+++ b/Plugins/XmlExport/xmlexport_global.h
@@ -0,0 +1,12 @@
+#ifndef XMLEXPORT_GLOBAL_H
+#define XMLEXPORT_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(XMLEXPORT_LIBRARY)
+# define XMLEXPORTSHARED_EXPORT Q_DECL_EXPORT
+#else
+# define XMLEXPORTSHARED_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // XMLEXPORT_GLOBAL_H