| 87 | }; |
| 88 | |
| 89 | struct mini_xml_node_printer : boost::static_visitor<> |
| 90 | { |
| 91 | mini_xml_node_printer(int indent = 0) |
| 92 | : indent(indent) |
| 93 | { |
| 94 | } |
| 95 | |
| 96 | void operator()(mini_xml const& xml) const |
| 97 | { |
| 98 | mini_xml_printer(indent+tabsize)(xml); |
| 99 | } |
| 100 | |
| 101 | void operator()(std::string const& text) const |
| 102 | { |
| 103 | tab(indent+tabsize); |
| 104 | std::cout << "text: \"" << text << '"' << std::endl; |
| 105 | } |
| 106 | |
| 107 | int indent; |
| 108 | }; |
| 109 | |
| 110 | void mini_xml_printer::operator()(mini_xml const& xml) const |
| 111 | { |