[libgeexml] Add clear method to element class
- From: Roberto Majadas <telemaco src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgeexml] Add clear method to element class
- Date: Mon, 6 Jul 2009 15:56:06 +0000 (UTC)
commit 6d19298f682ff1e80c91c75552f10b92ee7742de
Author: Roberto Majadas <roberto majadas openshine com>
Date: Sun Jul 5 18:17:40 2009 +0200
Add clear method to element class
geexml/ElementTree.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/geexml/ElementTree.vala b/geexml/ElementTree.vala
index f9c4801..153881f 100644
--- a/geexml/ElementTree.vala
+++ b/geexml/ElementTree.vala
@@ -227,6 +227,13 @@ namespace Gee.XmlEtree {
public void append( Element e ) {
this.node->add_child( e.node );
}
+ public void clear () {
+ Xml.Node* new_node;
+
+ new_node = new Xml.Node( null, this.tag );
+ this.node = this.node->replace( new_node ) ;
+
+ }
public void set_attrib( string attr, string value ) {
if ( this.node != null ){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]