Go to the documentation of this file.
10 #ifndef CPROVER_UTIL_XML_H
11 #define CPROVER_UTIL_XML_H
24 explicit xmlt(
const std::string &_name):
name(_name)
35 elementst::const_iterator
find(
const std::string &key)
const;
36 elementst::iterator
find(
const std::string &key);
39 const std::string &attribute,
43 const std::string &attribute,
47 const std::string &attribute,
48 unsigned long long value);
51 const std::string &attribute,
52 const std::string &value);
55 const std::string &attribute)
const
57 attributest::const_iterator i=
attributes.find(attribute);
64 const std::string &attribute,
72 attributest::const_iterator i=
attributes.find(attribute);
74 return (i->second==
"true");
80 elementst::const_iterator i=
find(element);
110 unsigned indent=0)
const;
112 static void escape(
const std::string &s, std::ostream &out);
113 static std::string
unescape(
const std::string &s);
131 #endif // CPROVER_UTIL_XML_H
bool get_attribute_bool(const std::string &attribute) const
xmlt & new_element(const xmlt &xml)
xmlt xml(const source_locationt &location)
static void escape(const std::string &s, std::ostream &out)
escaping for XML elements
std::map< std::string, std::string > attributest
void output(std::ostream &out, unsigned indent=0) const
std::list< xmlt > elementst
static void do_indent(std::ostream &out, unsigned indent)
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
std::string get_attribute(const std::string &attribute) const
std::string get_element(const std::string &element) const
elementst::const_iterator find(const std::string &key) const
void set_attribute(const std::string &attribute, unsigned value)
void set_attribute_bool(const std::string &attribute, bool value)
static std::string unescape(const std::string &s)
takes a string and unescapes any xml style escaped symbols
xmlt & new_element(const std::string &key)
std::ostream & operator<<(std::ostream &out, const xmlt &xml)
xmlt(const std::string &_name)