[gxml] Element.vala: update doc for content property on its correct behaviour
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Element.vala: update doc for content property on its correct behaviour
- Date: Thu, 22 Aug 2013 17:16:58 +0000 (UTC)
commit b04e1c94119d0d9c081f7e39180292f0f911c919
Author: Richard Schwarting <aquarichy gmail com>
Date: Mon Aug 19 09:37:09 2013 -0400
Element.vala: update doc for content property on its correct behaviour
gxml/Element.vala | 35 ++++++++++-------------------------
1 files changed, 10 insertions(+), 25 deletions(-)
---
diff --git a/gxml/Element.vala b/gxml/Element.vala
index d08f20c..ad2a53b 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -520,35 +520,20 @@ namespace GXml {
}
}
- // /**
- // * This is a convenience method for Elements, mostly
- // * useful when you know a given element's children are
- // * only Text. With the example {{{<shops><shop
- // * id="1">Eeylops Owl Emporium</shop><shop
- // * id="2">Obscurus Books</shop></shops>}}} 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
- // * {{{<shop id="1">Eeylops Owl Emporium</shop><shop
- // * id="2">Obscurus Books</shop>}}}
- // *
- // * @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 {{{<shops><shop
- * id="1">Eeylops Owl Emporium</shop><shop
- * id="2">Obscurus Books</shop></shops>}}} taking the
+ * This is a convenience property for Elements, useful
+ * when you want to see Text descendents of an
+ * element. With the XML example {{{<shops><shop
+ * id="1">Eeylops Owl Emporium</shop><shop
+ * id="2">Obscurus Books</shop></shops>}}} 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
- * {{{<shop id="1">Eeylops Owl Emporium</shop><shop
- * id="2">Obscurus Books</shop>}}}
+ * {{{Eeylops Owl EmporiumObscurus Books}}} with the
+ * XML tags omitted.
+ *
+ * Setting content replaces the Element's children
+ * with a Text node containing `value`.
*/
// TODO: add test
public string content {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]