|
Milo
0.1
Milo:EquationManipulationProgram
|
Classes | |
| class | FSM |
| class | Parser |
| class | Stream |
Enumerations | |
| enum | State { HEADER =1, HEADER_END =2, FOOTER =4, ATOM_END =8, NAME_VALUE =16, ELEMENT =32, NEW =64, ILLEGAL =128, FINISH =256 } |
Functions | |
| string | to_string (State state) |
| Stream & | operator<< (Stream &xml, State state) |
| Stream & | operator<< (Stream &xml, const string &tag) |
| void | escape_tag (string &tag) |
| void | unescape_tag (string &tag) |
| Stream & | operator<< (Stream &xml, const std::string &tag) |
| void | escape_tag (std::string &tag) |
| void | unescape_tag (std::string &tag) |
XML namespace processing interface. XML namespace interface is the module that milo uses for XML processing. It contains an input stream and an output stream.
| enum XML::State |
enum State stores the current state of the XML Finite State Machine. The XML Finite State Machine contains the state either from the last input processed or the last output given to the stream. When the parser (input) or the stream (output) the FSM is advanced to a new state. This transition is checked to see if it is legal. FSM starts out at NEW state whose only legal transition is HEADER. Each state corresponds to the following tokens:
HEADER => <{tag_name} ELEMENT => Any string in between tags HEADER_END => > ========================================================= FOOTER => <{tag_name}> NEW => State at beginning ATOM_END => /> ILLEGAL => new state not legal transition from prev state NAME_VALUE => {name}="{value}" FINISH => Output only. Close all open headers
| void XML::escape_tag | ( | std::string & | tag | ) |
Convert characters in string to their escaped counterparts. { &, <, >, ", '} => { &, <, >, ", &apos }
Operator << overloading to send string to XML stream. Allows xml << "foo & bar" equivalent to xml.out("foo & bar"). This ends up as "foo & bar" in output
| void XML::unescape_tag | ( | std::string & | tag | ) |
Convert escaped character in string to regular text. { &, <, >, ", &apos } => { &, <, >, ", '}
1.8.11