[gxml] Initial test of GXml.Node.childs.add()



commit fd615768eef9b3d1d6f5e5b26e339553fef0dc4a
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Apr 15 18:36:54 2015 -0500

    Initial test of GXml.Node.childs.add()

 gxml/Document.vala                   |    5 +++++
 test/SerializableGeeTreeMapTest.vala |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gxml/Document.vala b/gxml/Document.vala
index dc12372..ed61ca7 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -26,5 +26,10 @@ public interface GXml.Document : Object, GXml.Node
 {
   public abstract GXml.Node root { get; }
   public abstract GLib.File file { get; set; }
+  /**
+   * This method sould create a new { link GXml.Element}
+   * is a matter of you to add as a child to any other
+   * { link GXml.Node}.
+   */
   public abstract GXml.Node create_element (string name);
 }
diff --git a/test/SerializableGeeTreeMapTest.vala b/test/SerializableGeeTreeMapTest.vala
index ad5e900..16aaaaf 100644
--- a/test/SerializableGeeTreeMapTest.vala
+++ b/test/SerializableGeeTreeMapTest.vala
@@ -103,7 +103,7 @@ class SerializableGeeTreeMapTest : GXmlTest
         c.set (o2.name, o2);
         var doc = new xDocument ();
         var root = (xElement) doc.create_element ("root");
-        doc.append_child (root);
+        doc.childs.add (root);
         c.serialize (root);
         if (!root.has_child_nodes ()) {
           stdout.printf (@"ERROR: root node have no childs $(doc)\n");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]