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