summaryrefslogtreecommitdiff
path: root/libs/pbd/xml++.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/xml++.cc')
-rw-r--r--libs/pbd/xml++.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index e2ccd67738..3046f971ab 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -652,13 +652,19 @@ static XMLSharedNodeList* find_impl(xmlXPathContext* ctxt, const string& xpath)
void
XMLNode::dump (ostream& s, string p) const
{
- s << p << _name << " ";
- for (XMLPropertyList::const_iterator i = _proplist.begin(); i != _proplist.end(); ++i) {
- s << (*i)->name() << "=" << (*i)->value() << " ";
- }
- s << "\n";
-
- for (XMLNodeList::const_iterator i = _children.begin(); i != _children.end(); ++i) {
- (*i)->dump (s, p + " ");
+ if (_is_content) {
+ s << p << " " << content() << "\n";
+ } else {
+ s << p << "<" << _name;
+ for (XMLPropertyList::const_iterator i = _proplist.begin(); i != _proplist.end(); ++i) {
+ s << " " << (*i)->name() << "=\"" << (*i)->value() << "\"";
+ }
+ s << ">\n";
+
+ for (XMLNodeList::const_iterator i = _children.begin(); i != _children.end(); ++i) {
+ (*i)->dump (s, p + " ");
+ }
+
+ s << p << "</" << _name << ">\n";
}
}