[gxml] libxml-Element implements GXml.Element



commit 99d747bafe76d7d8e7c85c2963b353b404ce4c9d
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Apr 15 17:51:22 2015 -0500

    libxml-Element implements GXml.Element
    
    * API changes on Document and Element interfaces
    * libxml-Document implements Document.file property

 gxml/Document.vala        |    1 -
 gxml/Element.vala         |   13 ++++++++++---
 gxml/libxml-Document.vala |    5 +++++
 gxml/libxml-Element.vala  |    2 --
 4 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/gxml/Document.vala b/gxml/Document.vala
index ac704eb..9d841c5 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -26,5 +26,4 @@ public interface GXml.Document : Object, GXml.Node
 {
   public abstract GXml.Node root { get; set; }
   public abstract GLib.File file { get; set; }
-  public abstract string to_string ();
 }
diff --git a/gxml/Element.vala b/gxml/Element.vala
index fe4eeb7..197d6c3 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -24,7 +24,14 @@ using Gee;
 
 public interface GXml.Element : Object, GXml.Node
 {
-  public abstract GXml.Node root { get; set; }
-  public abstract GLib.File file { get; set; }
-  public abstract string to_string ();
+    public abstract void normalize ();
+    public abstract void set_attribute (string name, string value);
+    /**
+     * This should be just a different name for { link GXml.Node.name}.
+     */
+    public abstract string tag_name { get; }
+    /**
+     * This should be just a different name for { link GXml.Node.value}.
+     */
+    public abstract string content { owned get; set; }
 }
diff --git a/gxml/libxml-Document.vala b/gxml/libxml-Document.vala
index d1f8786..bc4afbc 100644
--- a/gxml/libxml-Document.vala
+++ b/gxml/libxml-Document.vala
@@ -1009,5 +1009,10 @@ namespace GXml {
                        // TODO: do we need to append this to this.new_nodes?  Do we need to append the 
result to this.nodes_to_free?  Test memory implications
                        return this.lookup_node (our_copy_xml); // inducing a GXmlNode
                }
+               // GXml.Document interface
+               public GLib.File file { get; set; }
+               /*
+               public abstract GXml.Node root { get; set; }
+               */
        }
 }
diff --git a/gxml/libxml-Element.vala b/gxml/libxml-Element.vala
index d22b989..b84c3d9 100644
--- a/gxml/libxml-Element.vala
+++ b/gxml/libxml-Element.vala
@@ -64,8 +64,6 @@ namespace GXml {
                                // TODO: is this the same as tagname from xDocument's get_elem_by...?
                                return base.node_name;
                        }
-                       private set {
-                       }
                }
 
                /**


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