|
CBMC
|
#include <xml.h>
Collaboration diagram for xmlt:Public Types | |
| typedef std::list< xmlt > | elementst |
| typedef std::map< std::string, std::string > | attributest |
Public Member Functions | |
| xmlt () | |
| xmlt (const std::string &_name) | |
| xmlt (std::string &&_name, attributest &&_attributes, elementst &&_elements) | |
| elementst::const_iterator | find (const std::string &key) const |
| elementst::iterator | find (const std::string &key) |
| void | set_attribute (const std::string &attribute, unsigned value) |
| void | set_attribute (const std::string &attribute, unsigned long value) |
| void | set_attribute (const std::string &attribute, unsigned long long value) |
| void | set_attribute (const std::string &attribute, const std::string &value) |
| std::string | get_attribute (const std::string &attribute) const |
| void | set_attribute_bool (const std::string &attribute, bool value) |
| bool | get_attribute_bool (const std::string &attribute) const |
| std::string | get_element (const std::string &element) const |
| xmlt & | new_element (const std::string &key) |
| xmlt & | new_element (const xmlt &xml) |
| xmlt & | new_element () |
| void | swap (xmlt &xml) |
| void | clear () |
| void | output (std::ostream &out, unsigned indent=0) const |
Static Public Member Functions | |
| static void | escape (const std::string &s, std::ostream &out) |
| escaping for XML elements | |
| static std::string | unescape (const std::string &s) |
| takes a string and unescapes any xml style escaped symbols | |
| static void | escape_attribute (const std::string &s, std::ostream &out) |
| escaping for XML attributes, assuming that double quotes " are used consistently, not single quotes | |
| static bool | is_printable_xml (const std::string &s) |
Determine whether s does not contain any characters that cannot be escaped in XML 1.0. | |
Public Attributes | |
| std::string | name |
| std::string | data |
| attributest | attributes |
| elementst | elements |
Static Protected Member Functions | |
| static void | do_indent (std::ostream &out, unsigned indent) |
| typedef std::map<std::string, std::string> xmlt::attributest |
| typedef std::list<xmlt> xmlt::elementst |
|
inline |
| xmlt::elementst::iterator xmlt::find | ( | const std::string & | key | ) |
| xmlt::elementst::const_iterator xmlt::find | ( | const std::string & | key | ) | const |
|
inline |
|
inline |
Determine whether s does not contain any characters that cannot be escaped in XML 1.0.
See https://www.w3.org/TR/xml/#charsets for details.
| s | string to verify |
s are taken from the charset permitted in XML 1.0.
|
static |
| attributest xmlt::attributes |