Loading...
Searching...
No Matches
#include <xml.h>
+ Collaboration diagram for xmlt:
Static Public Member Functions
escaping for XML elements
takes a string and unescapes any xml style escaped symbols
escaping for XML attributes, assuming that double quotes " are used consistently, not single quotes
Determine whether
s does not contain any characters that cannot be escaped in XML
1.0.
Static Protected Member Functions
Detailed Description
Definition at line 20 of file xml.h.
Member Typedef Documentation
◆ attributest
Definition at line 30 of file xml.h.
◆ elementst
Definition at line 29 of file xml.h.
Constructor & Destructor Documentation
◆ 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]
xmlt::xmlt
(
std::string &&
_name,
)
inline
Definition at line 32 of file xml.h.
Member Function Documentation
◆ clear()
◆ do_indent()
void xmlt::do_indent
(
std::ostream &
out,
)
staticprotected
◆ escape()
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
-
s string to verify
- 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]
◆ output()
void xmlt::output
(
std::ostream &
out,
)
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,
)
◆ set_attribute() [3/4]
void xmlt::set_attribute
(
const std::string &
attribute,
)
◆ set_attribute() [4/4]
void xmlt::set_attribute
(
const std::string &
attribute,
)
◆ set_attribute_bool()
void xmlt::set_attribute_bool
(
const std::string &
attribute,
)
inline
Definition at line 72 of file xml.h.
◆ swap()
◆ 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.
Member Data Documentation
◆ 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