1
2
3
4
5
6
7
8
9
10
11 #ifndef SNGXML_XML_XML_PARSER
12 #define SNGXML_XML_XML_PARSER
13 #include <sngxml/xml/XmlContentHandler.hpp>
14
15 namespace sngxml { namespace xml {
16
17 enum class Flags : int
18 {
19 none= 0, debug= 1 << 0
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, Flags flag)
28 {
29 return static_cast<Flags>(static_cast<int>(flags) | static_cast<int>(flag));
30 }
31
32 inline Flags operator~(Flags flags)
33 {
34 return static_cast<Flags>(~static_cast<int>(flags));
35 }
36
37
38
39
40
41 void ParseXmlFile(const std::string& xmlFileName, XmlContentHandler* contentHandler);
42 void ParseXmlFile(const std::string& xmlFileName, XmlContentHandler* contentHandler, Flags flags);
43
44
45
46
47
48
49
50 void ParseXmlContent(const std::string& xmlContent, const std::string& systemId, XmlContentHandler* contentHandler);
51 void ParseXmlContent(const std::string& xmlContent, const std::string& systemId, XmlContentHandler* contentHandler, Flags flags);
52
53
54
55
56
57
58
59 void ParseXmlContent(const std::u32string& xmlContent, const std::string& systemId, XmlContentHandler* contentHandler);
60 void ParseXmlContent(const std::u32string& xmlContent, const std::string& systemId, XmlContentHandler* contentHandler, Flags flags);
61
62 } }
63
64 #endif // SNGXML_XML_XML_PARSER