1
2
3
4
5
6 #ifndef SNGXML_DOM_PARSER_INCLUDED
7 #define SNGXML_DOM_PARSER_INCLUDED
8 #include <sngxml/dom/Document.hpp>
9
10 namespace sngxml { namespace dom {
11
12 enum class Flags : int
13 {
14 none= 0, debug= 1 << 0
15 };
16
17 inline Flags operator&(Flags flags, Flags flag)
18 {
19 return static_cast<Flags>(static_cast<int>(flags) & static_cast<int>(flag));
20 }
21
22 inline Flags operator|(Flags flags, Flags flag)
23 {
24 return static_cast<Flags>(static_cast<int>(flags) | static_cast<int>(flag));
25 }
26
27 inline Flags operator~(Flags flags)
28 {
29 return static_cast<Flags>(~static_cast<int>(flags));
30 }
31
32 std::unique_ptr<Document> ParseDocument(const std::u32string& content, const std::string& systemId);
33 std::unique_ptr<Document> ParseDocument(const std::u32string& content, const std::string& systemId, Flags flags);
34 std::unique_ptr<Document> ReadDocument(const std::string& fileName);
35 std::unique_ptr<Document> ReadDocument(const std::string& fileName, Flags flags);
36
37 } }
38
39 #endif // SNGXML_DOM_PARSER_INCLUDED