summaryrefslogtreecommitdiff
path: root/src/xml.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-07 10:25:15 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:39 -0400
commita07e20c14e5ba3597a855276ad9a195343aee42f (patch)
tree2148a9a8e3038993cca6865a025a582e95f9caac /src/xml.cc
parent8aada79971b772fda92131053fa03021cfbc625a (diff)
downloadfork-ledger-a07e20c14e5ba3597a855276ad9a195343aee42f.tar.gz
fork-ledger-a07e20c14e5ba3597a855276ad9a195343aee42f.tar.bz2
fork-ledger-a07e20c14e5ba3597a855276ad9a195343aee42f.zip
Changed write methods to print.
Diffstat (limited to 'src/xml.cc')
-rw-r--r--src/xml.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xml.cc b/src/xml.cc
index 83d28c78..4d4db5d6 100644
--- a/src/xml.cc
+++ b/src/xml.cc
@@ -116,11 +116,11 @@ const char * document_t::lookup_name(int id) const
}
}
-void document_t::write(std::ostream& out) const
+void document_t::print(std::ostream& out) const
{
if (top) {
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
- top->write(out);
+ top->print(out);
}
}
@@ -222,19 +222,19 @@ void parent_node_t::add_child(node_t * node)
_last_child = node;
}
-void parent_node_t::write(std::ostream& out, int depth) const
+void parent_node_t::print(std::ostream& out, int depth) const
{
for (int i = 0; i < depth; i++) out << " ";
out << '<' << name() << ">\n";
for (node_t * child = children(); child; child = child->next)
- child->write(out, depth + 1);
+ child->print(out, depth + 1);
for (int i = 0; i < depth; i++) out << " ";
out << "</" << name() << ">\n";
}
-void terminal_node_t::write(std::ostream& out, int depth) const
+void terminal_node_t::print(std::ostream& out, int depth) const
{
for (int i = 0; i < depth; i++) out << " ";