summaryrefslogtreecommitdiff
path: root/zen/xml_io.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:31:23 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:31:23 +0200
commit851b6f99c1248c8ec8e33322a3179c1d82fdd515 (patch)
tree5b9abf4c4e648ea48ed4873e3c4bf1b225c64daf /zen/xml_io.h
parent6.1 (diff)
downloadFreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.tar.gz
FreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.tar.bz2
FreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.zip
6.2
Diffstat (limited to 'zen/xml_io.h')
-rw-r--r--zen/xml_io.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/zen/xml_io.h b/zen/xml_io.h
new file mode 100644
index 00000000..b53a5ef4
--- /dev/null
+++ b/zen/xml_io.h
@@ -0,0 +1,27 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef XMLBASE_H_INCLUDED
+#define XMLBASE_H_INCLUDED
+
+#include <zenxml/xml.h>
+#include <zen/zstring.h>
+#include <zen/file_error.h>
+
+//combine zen::Xml and zen file i/o
+//-> loadXmlDocument vs loadStream:
+//1. better error reporting
+//2. quick exit if (potentially large) input file is not an XML
+
+namespace zen
+{
+XmlDoc loadXmlDocument(const Zstring& filename); //throw FileError
+void checkForMappingErrors(const XmlIn& xmlInput, const Zstring& filename); //throw FileError
+
+void saveXmlDocument(const XmlDoc& doc, const Zstring& filename); //throw FileError
+}
+
+#endif // XMLBASE_H_INCLUDED
bgstack15