Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef LIBETONYEK_XML_H_INCLUDED
00011 #define LIBETONYEK_XML_H_INCLUDED
00012
00013 #include <string>
00014
00015 #include "libetonyek_utils.h"
00016
00017 #define KEY_DEBUG_XML_NOT_EMPTY(name, ns) KEY_DEBUG_MSG(("element %s%s%s%s is not empty, skipping content...\n", ns ? "{" : "", ns, ns ? "}" : "", name))
00018 #define KEY_DEBUG_XML_UNKNOWN(type, name, ns) KEY_DEBUG_MSG(("unknown %s %s%s%s%s\n", type, ns ? "{" : "", ns, ns ? "}" : "", name))
00019 #define KEY_DEBUG_XML_TODO(type, name, ns) KEY_DEBUG_MSG(("TODO: unprocessed %s %s%s%s%s\n", type, ns ? "{" : "", ns, ns ? "}" : "", name))
00020
00021 #define KEY_DEBUG_XML_TODO_ELEMENT(element) KEY_DEBUG_XML_TODO("element", (element).getName(), (element).getNamespace())
00022 #define KEY_DEBUG_XML_TODO_ATTRIBUTE(attr) KEY_DEBUG_XML_TODO("attribute", (attr).getName(), (attr).getNamespace())
00023 #define KEY_DEBUG_XML_UNKNOWN_ELEMENT(element) KEY_DEBUG_XML_UNKNOWN("element", (element).getName(), (element).getNamespace())
00024 #define KEY_DEBUG_XML_UNKNOWN_ATTRIBUTE(attr) KEY_DEBUG_XML_UNKNOWN("attribute", (attr).getName(), (attr).getNamespace())
00025
00026 namespace libetonyek
00027 {
00028
00029 class KEYXMLReader;
00030
00031 void skipElement(const KEYXMLReader &reader);
00032
00033 bool checkElement(const KEYXMLReader &reader, int name, int ns);
00034 bool checkEmptyElement(const KEYXMLReader &reader);
00035 bool checkNoAttributes(const KEYXMLReader &reader);
00036
00037 std::string readOnlyAttribute(const KEYXMLReader &reader, int name, int ns);
00038 std::string readOnlyElementAttribute(const KEYXMLReader &reader, int name, int ns);
00039
00040 }
00041
00042 #endif // LIBETONYEK_XML_H_INCLUDED
00043
00044