libetonyek_xml.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libetonyek project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef LIBETONYEK_XML_H_INCLUDED
11#define LIBETONYEK_XML_H_INCLUDED
12
13#include <string>
14
15#include "libetonyek_utils.h"
16
17#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))
18#define KEY_DEBUG_XML_UNKNOWN(type, name, ns) KEY_DEBUG_MSG(("unknown %s %s%s%s%s\n", type, ns ? "{" : "", ns, ns ? "}" : "", name))
19#define KEY_DEBUG_XML_TODO(type, name, ns) KEY_DEBUG_MSG(("TODO: unprocessed %s %s%s%s%s\n", type, ns ? "{" : "", ns, ns ? "}" : "", name))
20
21#define KEY_DEBUG_XML_TODO_ELEMENT(element) KEY_DEBUG_XML_TODO("element", (element).getName(), (element).getNamespace())
22#define KEY_DEBUG_XML_TODO_ATTRIBUTE(attr) KEY_DEBUG_XML_TODO("attribute", (attr).getName(), (attr).getNamespace())
23#define KEY_DEBUG_XML_UNKNOWN_ELEMENT(element) KEY_DEBUG_XML_UNKNOWN("element", (element).getName(), (element).getNamespace())
24#define KEY_DEBUG_XML_UNKNOWN_ATTRIBUTE(attr) KEY_DEBUG_XML_UNKNOWN("attribute", (attr).getName(), (attr).getNamespace())
25
26namespace libetonyek
27{
28
29class KEYXMLReader;
30
31void skipElement(const KEYXMLReader &reader);
32
33bool checkElement(const KEYXMLReader &reader, int name, int ns);
34bool checkEmptyElement(const KEYXMLReader &reader);
35bool checkNoAttributes(const KEYXMLReader &reader);
36
37std::string readOnlyAttribute(const KEYXMLReader &reader, int name, int ns);
38std::string readOnlyElementAttribute(const KEYXMLReader &reader, int name, int ns);
39
40}
41
42#endif // LIBETONYEK_XML_H_INCLUDED
43
44/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
@ string
Definition: KEY1Token.h:75
@ name
Definition: KEY1Token.h:136
Definition: EtonyekDocument.cpp:41
bool checkElement(const KEYXMLReader &reader, const int name, const int ns)
Definition: libetonyek_xml.cpp:37
string readOnlyElementAttribute(const KEYXMLReader &reader, const int name, const int ns)
Definition: libetonyek_xml.cpp:86
string readOnlyAttribute(const KEYXMLReader &reader, const int name, const int ns)
Definition: libetonyek_xml.cpp:69
bool checkEmptyElement(const KEYXMLReader &reader)
Definition: libetonyek_xml.cpp:42
void skipElement(const KEYXMLReader &reader)
Definition: libetonyek_xml.cpp:30
bool checkNoAttributes(const KEYXMLReader &reader)
Definition: libetonyek_xml.cpp:56

Generated for libetonyek by doxygen 1.9.3