|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file.
52 auto& os = target->ostream();
87 std::string in0 (indent_level *
indent,
' ');
91 if (value->
content.size() == 0) {
99 if (value->
content.size() == 1 && value->
content[0]->is_markup()) {
102 std::string in1 ((indent_level + 1) *
indent,
' ');
105 for (
auto& v : value->
content) {
106 if (v->is_comment()) {
109 }
else if (v->is_markup()) {
112 }
else if (v->is_element()) {
123 os <<
"</" << value->
tag <<
">";
132 for (
auto pair : attr) {
Provides functions for accessing the file system.
void print_element_(XmlElement const *value, const int indent_level, std::ostream &os) const
Print an XML element.
const XmlElement * xml_value_to_element(const XmlValue *v)
Converts a pointer to an XmlValue to XmlElement if appropriate.
StringMapType declarations
void write(XmlDocument const &document, std::shared_ptr< utils::BaseOutputTarget > target) const
const XmlComment * xml_value_to_comment(const XmlValue *v)
Converts a pointer to an XmlValue to XmlComment if appropriate.
int indent
Indent used for printing the XML elements.
Provides some commonly used string utility functions.
Provides easy and fast logging functionality.
std::vector< std::unique_ptr< XmlValue > > content
void print_comment_(XmlComment const *value, std::ostream &os) const
Print an XML comment.
std::string xml_escape(std::string const &txt)
Escape special XML characters.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
std::string print_attributes_list_(StringMapType attr) const
Print a list of XML attributes.
std::string xml_comment(std::string const &content)
std::string xml_attribute(std::string const &name, T const &value)
const XmlMarkup * xml_value_to_markup(const XmlValue *v)
Converts a pointer to an XmlValue to XmlMarkup if appropriate.
A collection of classes for working with XML documents. See XmlDocument for more.
void print_markup_(XmlMarkup const *value, std::ostream &os) const
Print an XML markup (simple text).