#include <xml.h>
|
static void | escape (const std::string &s, std::ostream &out) |
| escaping for XML elements More...
|
|
static std::string | unescape (const std::string &s) |
| takes a string and unescapes any xml style escaped symbols More...
|
|
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 More...
|
|
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. More...
|
|
|
static void | do_indent (std::ostream &out, unsigned indent) |
|
Definition at line 20 of file xml.h.
◆ attributest
Definition at line 30 of file xml.h.
◆ elementst
Definition at line 29 of file xml.h.
◆ xmlt() [1/3]
Definition at line 23 of file xml.h.
◆ xmlt() [2/3]
xmlt::xmlt |
( |
const std::string & |
_name | ) |
|
|
inlineexplicit |
Definition at line 26 of file xml.h.
◆ xmlt() [3/3]
Definition at line 32 of file xml.h.
◆ clear()
void xmlt::clear |
( |
void |
| ) |
|
◆ do_indent()
void xmlt::do_indent |
( |
std::ostream & |
out, |
|
|
unsigned |
indent |
|
) |
| |
|
staticprotected |
◆ escape()
void xmlt::escape |
( |
const std::string & |
s, |
|
|
std::ostream & |
out |
|
) |
| |
|
static |
escaping for XML elements
Definition at line 79 of file xml.cpp.
◆ escape_attribute()
void xmlt::escape_attribute |
( |
const std::string & |
s, |
|
|
std::ostream & |
out |
|
) |
| |
|
static |
escaping for XML attributes, assuming that double quotes " are used consistently, not single quotes
Definition at line 121 of file xml.cpp.
◆ find() [1/2]
xmlt::elementst::iterator xmlt::find |
( |
const std::string & |
key | ) |
|
◆ find() [2/2]
xmlt::elementst::const_iterator xmlt::find |
( |
const std::string & |
key | ) |
const |
◆ get_attribute()
std::string xmlt::get_attribute |
( |
const std::string & |
attribute | ) |
const |
|
inline |
Definition at line 63 of file xml.h.
◆ get_attribute_bool()
bool xmlt::get_attribute_bool |
( |
const std::string & |
attribute | ) |
const |
|
inline |
Definition at line 79 of file xml.h.
◆ get_element()
std::string xmlt::get_element |
( |
const std::string & |
element | ) |
const |
|
inline |
Definition at line 87 of file xml.h.
◆ is_printable_xml()
bool xmlt::is_printable_xml |
( |
const std::string & |
s | ) |
|
|
static |
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.
- Parameters
-
- Returns
- True if, and only if, all characters in
s
are taken from the charset permitted in XML 1.0.
Definition at line 160 of file xml.cpp.
◆ new_element() [1/3]
xmlt& xmlt::new_element |
( |
| ) |
|
|
inline |
◆ new_element() [2/3]
xmlt& xmlt::new_element |
( |
const std::string & |
key | ) |
|
|
inline |
Definition at line 95 of file xml.h.
◆ new_element() [3/3]
xmlt& xmlt::new_element |
( |
const xmlt & |
xml | ) |
|
|
inline |
◆ output()
void xmlt::output |
( |
std::ostream & |
out, |
|
|
unsigned |
indent = 0 |
|
) |
| const |
◆ set_attribute() [1/4]
void xmlt::set_attribute |
( |
const std::string & |
attribute, |
|
|
const std::string & |
value |
|
) |
| |
◆ set_attribute() [2/4]
void xmlt::set_attribute |
( |
const std::string & |
attribute, |
|
|
unsigned long long |
value |
|
) |
| |
◆ set_attribute() [3/4]
void xmlt::set_attribute |
( |
const std::string & |
attribute, |
|
|
unsigned long |
value |
|
) |
| |
◆ set_attribute() [4/4]
void xmlt::set_attribute |
( |
const std::string & |
attribute, |
|
|
unsigned |
value |
|
) |
| |
◆ set_attribute_bool()
void xmlt::set_attribute_bool |
( |
const std::string & |
attribute, |
|
|
bool |
value |
|
) |
| |
|
inline |
Definition at line 72 of file xml.h.
◆ swap()
void xmlt::swap |
( |
xmlt & |
xml | ) |
|
◆ unescape()
std::string xmlt::unescape |
( |
const std::string & |
str | ) |
|
|
static |
takes a string and unescapes any xml style escaped symbols
- parameters: a string
- Returns
- the unescaped string
Definition at line 237 of file xml.cpp.
◆ attributes
Definition at line 41 of file xml.h.
◆ data
Definition at line 39 of file xml.h.
◆ elements
Definition at line 42 of file xml.h.
◆ name
Definition at line 39 of file xml.h.
The documentation for this class was generated from the following files:
- /home/runner/work/cbmc/cbmc/src/util/xml.h
- /home/runner/work/cbmc/cbmc/src/util/xml.cpp