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)
31 :
name(std::move(_name)),
42 elementst::const_iterator
find(
const std::string &key)
const;
43 elementst::iterator
find(
const std::string &key);
46 const std::string &attribute,
50 const std::string &attribute,
54 const std::string &attribute,
55 unsigned long long value);
58 const std::string &attribute,
59 const std::string &value);
62 const std::string &attribute)
const
64 attributest::const_iterator i=
attributes.find(attribute);
71 const std::string &attribute,
79 attributest::const_iterator i=
attributes.find(attribute);
81 return (i->second==
"true");
87 elementst::const_iterator i=
find(element);
117 unsigned indent=0)
const;
119 static void escape(
const std::string &s, std::ostream &out);
120 static std::string
unescape(
const std::string &s);
138 #endif // CPROVER_UTIL_XML_H
bool get_attribute_bool(const std::string &attribute) const
xmlt & new_element(const xmlt &xml)
xmlt(std::string &&_name, attributest &&_attributes, elementst &&_elements)
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
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
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)