-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathxmlObjects.h
More file actions
33 lines (25 loc) · 767 Bytes
/
xmlObjects.h
File metadata and controls
33 lines (25 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef XML_OBJECTSewjhiorj5584jr08j453
#define XML_OBJECTSewjhiorj5584jr08j453
#include <string>
#include "../util/automata.h"
namespace xml {
struct Attribute {
std::string name;
std::string value;
void swap(Attribute && other) throw()
{
name.swap(other.name);
value.swap(other.value);
}
};
typedef automata::FiniteAutomata<automata::Range<char>,automata::MealyTransition<automata::Range<char>>> ParserAutomata;
enum EventState {
no_event, start_tag, end_tag, empty_tag,
start_attribute, attr_name, attr_value,
start_chars, end_chars,
processing_instruction, element_notation,
special_element, special_element_ending, special_element_end,
};
enum Exception { ABORTED, PREMATURE_EOF, MALFORMED, EXTRA, TAG_MISMATCH, UNSUPPORTED, };
}
#endif