Go to the documentation of this file.
44 this->document = document;
45 node = document->allocate_node(
node_type);
49 this->document = document;
50 node = document->allocate_node(
node_type, cloneString(name));
66 if (
value != defaultValue)
92 const char* cloneString(
const std::string&
str)
94 return document->allocate_string(
str.c_str());
110 document.append_node(declaration.node);
116 document.append_node(rootNode.node);
129 file.open(path.c_str());
130 file <<
print(indent);
RapidXmlWriterNode & append_data_node(const std::string &value)
OutIt print(OutIt out, const xml_node< Ch > &node, int flags=0)
Prints XML to given output iterator.
@ node_data
A data node. Name is empty. Value contains data text.
@ node_element
An element node. Name contains element name. Value contains text of first data node.
@ node_declaration
A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalon...
RapidXmlWriterNode & append_bool_attribute(const std::string &name, const std::string &trueValue, const std::string &falseValue, bool value)
RapidXmlWriterNode & append_optional_bool_attribute(const std::string &name, const std::string &trueValue, const std::string &falseValue, bool value, bool defaultValue)
std::string print(bool indent)
std::shared_ptr< Value > value()
const int print_no_indenting
Printer flag instructing the printer to suppress indenting of XML. See print() function.
RapidXmlWriterNode & append_attribute(const std::string &name, const std::string &value)
This class represents root of the DOM hierarchy.
Class representing a node of XML document.
node_type
Enumeration listing all node types produced by the parser.
void append_node(xml_node< Ch > *child)
Appends a new child node.
void saveToFile(const std::string &path, bool indent)
RapidXmlWriterNode createRootNode(const std::string &name)
RapidXmlWriterNode & append_string_node(const std::string &name, const std::string &value)
RapidXmlWriterNode append_node(const std::string &name)
void append_attribute(xml_attribute< Ch > *attribute)
Appends a new attribute to the node.
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.