diff --git a/gxml/Element.vala b/gxml/Element.vala
index 2a256e27ad79032fb3726e4613e8157b9b8af6f7..0f0a2063f2df42fad480a8b9f84c30ac8140d259 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -281,5 +281,51 @@ namespace GXml.Dom {
}
}
+
+ // /**
+ // * This is a convenience method for Elements, mostly
+ // * useful when you know a given element's children are
+ // * only Text. With the example {{{Eeylops Owl EmporiumObscurus Books}}} taking the
+ // * node for the shop element with id 1 and using this
+ // * method, you would get back "Eeylops Owl Emporiums".
+ // * If you used it on the shops element, you'd get
+ // * 'Eeylops Owl EmporiumObscurus Books'
+ // *
+ // * @return XML string of child contents
+ // */
+ // public string content_to_string () {
+ // return this.child_nodes.to_string (true);
+ // }
+
+ /**
+ * This is a convenience property for Elements, mostly
+ * useful when you know a given element's children are
+ * only Text. With the example {{{Eeylops Owl EmporiumObscurus Books}}} taking the
+ * node for the shop element with id 1 and using this
+ * method, you would get back "Eeylops Owl Emporiums".
+ * If you used it on the shops element, you'd get
+ * 'Eeylops Owl EmporiumObscurus Books'
+ */
+ // TODO: add test
+ public string content {
+ owned get {
+ //return this.child_nodes.to_string (true);
+ return base.node->get_content ();
+ // TODO: what's the difference between this and stringifying
+ // the child nodes?
+ }
+ set {
+ // TODO: check impact on existing child nodes; they will be
+ // detached, right?
+ // TODO: is XML in value interpreted or escaped?
+ base.node->set_content (value);
+ }
+ }
}
}