[gxml] XElement: renamed to GElement



commit dcd4fa68850d1e106c44ba7e725f50c951308458
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Jul 4 22:54:36 2019 -0500

    XElement: renamed to GElement

 gxml/GXPathObject.vala                   | 2 +-
 gxml/GXmlDocument.vala                   | 6 +++---
 gxml/GXmlNode.vala                       | 2 +-
 gxml/XChildNode.vala                     | 4 ++--
 gxml/{GXmlElement.vala => XElement.vala} | 4 ++--
 gxml/meson.build                         | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gxml/GXPathObject.vala b/gxml/GXPathObject.vala
index 0ea6fe6..db2ac1e 100644
--- a/gxml/GXPathObject.vala
+++ b/gxml/GXPathObject.vala
@@ -36,7 +36,7 @@ public class GXml.GXPathObject : GLib.Object, GXml.XPathObject {
 
     if (_object_type == GXml.XPathObjectType.NODESET)
       for (var i = 0; i < pointer->nodesetval->length(); i++)
-        _collection.add (new GXml.GElement (document, pointer->nodesetval->item (i)));
+        _collection.add (new GXml.XElement (document, pointer->nodesetval->item (i)));
     else if (_object_type == GXml.XPathObjectType.BOOLEAN)
       _boolean_value = pointer->boolval == 1;
     else if (_object_type == GXml.XPathObjectType.STRING)
diff --git a/gxml/GXmlDocument.vala b/gxml/GXmlDocument.vala
index 88f7b9f..3c4f5ef 100644
--- a/gxml/GXmlDocument.vala
+++ b/gxml/GXmlDocument.vala
@@ -118,7 +118,7 @@ public class GXml.GDocument : GXml.GNode,
           GLib.warning ("Document have more than one root GXmlElement. Using first found");
         }
       } 
-      return new GElement (this, r);
+      return new XElement (this, r);
     }
   }
   public GXml.DomNode create_pi (string target, string data)
@@ -196,7 +196,7 @@ public class GXml.GDocument : GXml.GNode,
         errmsg = ".  ";
       throw new GXml.Error.PARSER (errmsg);
     }
-    return new GElement (this, el);
+    return new XElement (this, el);
   }
   public DomElement GXml.DomDocument.create_element_ns (string? ns, string qualified_name) throws GLib.Error
   {
@@ -211,7 +211,7 @@ public class GXml.GDocument : GXml.GNode,
         qname = s[1];
       }
       var e = (this as GXml.DomDocument).create_element (qname);
-      (e as GElement).set_namespace (ns, prefix);
+      (e as XElement).set_namespace (ns, prefix);
       return e as DomElement;
   }
 
diff --git a/gxml/GXmlNode.vala b/gxml/GXmlNode.vala
index 2c75613..ceb8715 100644
--- a/gxml/GXmlNode.vala
+++ b/gxml/GXmlNode.vala
@@ -98,7 +98,7 @@ public abstract class GXml.GNode : Object,
     var t = (GXml.NodeType) node->type;
     switch (t) {
       case GXml.NodeType.ELEMENT:
-        return new GElement (doc, node);
+        return new XElement (doc, node);
       case GXml.NodeType.ATTRIBUTE:
         return new XAttribute (doc, (Xml.Attr*) node);
       case GXml.NodeType.TEXT:
diff --git a/gxml/XChildNode.vala b/gxml/XChildNode.vala
index 58371d5..d1def58 100644
--- a/gxml/XChildNode.vala
+++ b/gxml/XChildNode.vala
@@ -45,7 +45,7 @@ public class GXml.XNonDocumentChildNode : GXml.XChildNode,
       if (_node == null) return null;
       var n = _node->previous_element_sibling ();
       if (n == null) return null;
-      return new GElement (owner_document as GDocument, n);
+      return new XElement (owner_document as GDocument, n);
     }
   }
   public DomElement? next_element_sibling {
@@ -53,7 +53,7 @@ public class GXml.XNonDocumentChildNode : GXml.XChildNode,
       if (_node == null) return null;
       var n = _node->next_element_sibling ();
       if (n == null) return null;
-      return new GElement (owner_document as GDocument, n);
+      return new XElement (owner_document as GDocument, n);
     }
   }
 }
diff --git a/gxml/GXmlElement.vala b/gxml/XElement.vala
similarity index 98%
rename from gxml/GXmlElement.vala
rename to gxml/XElement.vala
index ae34579..7125770 100644
--- a/gxml/GXmlElement.vala
+++ b/gxml/XElement.vala
@@ -28,12 +28,12 @@ using Gee;
  * DOM4 Class implemeting {@link GXml.DomElement} interface,
  * powered by libxml-2.0 library.
  */
-public class GXml.GElement : GXml.XNonDocumentChildNode,
+public class GXml.XElement : GXml.XNonDocumentChildNode,
                             GXml.DomParentNode,
                             GXml.DomElement,
                             GXml.XPathContext
 {
-  public GElement (GDocument doc, Xml.Node *node) {
+  public XElement (GDocument doc, Xml.Node *node) {
     _node = node;
     _doc = doc;
   }
diff --git a/gxml/meson.build b/gxml/meson.build
index 2157027..0bc123d 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -68,7 +68,6 @@ valasources = files ([
        'GomStringRef.vala',
        'GomText.vala',
        'GXmlDocument.vala',
-       'GXmlElement.vala',
        'gxml-init.vala',
        'GXmlListNamespaces.vala',
        'GXmlNamespace.vala',
@@ -83,6 +82,7 @@ valasources = files ([
        'XCharacter.vala',
        'XChildNode.vala',
        'XComment.vala',
+       'XElement.vala',
        'XHashMapAttr.vala',
        'XListChildren.vala',
        'XParser.vala',


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