[gxml/newattr: 6/13] Node.vala: changed attributes from a GLib.HashTable to a GXml.NamedAttrMap
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/newattr: 6/13] Node.vala: changed attributes from a GLib.HashTable to a GXml.NamedAttrMap
- Date: Tue, 22 Oct 2013 06:56:15 +0000 (UTC)
commit cd266058e316db322862b56522f814da11ad83d8
Author: Richard Schwarting <aquarichy gmail com>
Date: Tue Oct 22 02:44:22 2013 -0400
Node.vala: changed attributes from a GLib.HashTable to a GXml.NamedAttrMap
gxml/Node.vala | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/gxml/Node.vala b/gxml/Node.vala
index de9a164..27bb0b7 100644
--- a/gxml/Node.vala
+++ b/gxml/Node.vala
@@ -76,7 +76,8 @@ namespace GXml {
message (" ns (prefix: %s, uri: %s)", this.prefix, this.namespace_uri);
if (this.attributes != null) {
message (" attributes:");
- foreach (Node attr in this.attributes.get_values ()) {
+ for (int i = 0; i < this.attributes.length; i++) {
+ Attr attr = this.attributes.item (i);
message (" %s", attr.node_name);
}
}
@@ -169,7 +170,9 @@ namespace GXml {
/**
* Stores the name of the node. Sometimes this is
* similar to the node type, but sometimes, it is
- * arbitrary.
+ * arbitrary data, like for { link GXml.Attr} where
+ * the node_name is the name of the Attr's name=value
+ * pair.
*
* Do not free this. It's memory will be released
* when the owning { link GXml.Document} is freed.
@@ -330,7 +333,7 @@ namespace GXml {
}
/**
- * A { link GLib.HashTable} representing the { link GXml.Attr}
+ * A { link GXml.NamedNodeMap} containing the { link GXml.Attr}
* attributes for this node. `attributes`
* actually only apply to { link GXml.Element}
* nodes. For all other { link GXml.Node} subclasses,
@@ -342,9 +345,13 @@ namespace GXml {
* Version: DOM Level 1 Core<<BR>>
* URL: [[http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-84CF09]]
*/
- public virtual HashTable<string,Attr>? attributes {
- get { return null; }
- internal set {}
+ public virtual NamedAttrMap? attributes {
+ // TODO: verify memory handling
+ get {
+ return null;
+ }
+ internal set {
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]