Top | ![]() |
![]() |
![]() |
![]() |
To create one, use
.gxml_xdocument_create_element()
These can have child nodes of various types including other Elements. Elements can have Attr attributes associated with them. Elements have tag names. In addition to methods inherited from Node, Elements have additional methods for manipulating attributes, as an alternative to manipulating the attributes HashMap directly.
Version: DOM Level 1 Core
URL: http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-745549614
gchar * gxml_xelement_get_attribute (GXmlxElement *self
,const gchar *name
);
Retrieve the attribute value, as a string, for an attribute associated with this element with the name name.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-666EE0F9
self |
the GXmlxElement instance |
|
name |
. The name of the attribute whose value to retrieve . |
[in] |
void gxml_xelement_set_attribute (GXmlxElement *self
,const gchar *name
,const gchar *value
);
Set the value of this element's attribute named name to the string value.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-F68F082
self |
the GXmlxElement instance |
|
name |
. Name of the attribute whose value to set . |
[in] |
value |
. The value to set . |
[in] |
void gxml_xelement_remove_attribute (GXmlxElement *self
,const gchar *name
);
Remove the attribute named name from this element.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-6D6AC0F9
GXmlxAttr * gxml_xelement_get_attribute_node (GXmlxElement *self
,const gchar *name
);
Get the Attr node representing this element's attribute named name.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-217A91B8
GXmlxAttr * gxml_xelement_set_attribute_node (GXmlxElement *self
,GXmlxAttr *new_attr
);
Set the attribute in Attr for this element.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-887236154
GXmlxAttr * gxml_xelement_remove_attribute_node (GXmlxElement *self
,GXmlxAttr *old_attr
);
Remove Attr old_attr from this element, if it was set.
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-D589198
GXmlxNodeList * gxml_xelement_get_elements_by_tag_name (GXmlxElement *self
,const gchar *tag_name
);
Obtains a NodeList of Elements with the given tag_name that are descendants of this xElement. This will include the current element if it matches. The returned list is updated as necessary as the tree changes.
Visual explanation of get_elements_by_tag_name tree traversal.
a b c d e f g we want: a b d e c f g start: add a pop top of stack (a) a: check for match: yes? add to return list a: add children from last to first (c,b) to top of stack (so head=b, then c) a a< [bc] b< [de]c d< ec e< c c< [fg] f< g g< see a, add a, visit a
Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1938918D
#define GXML_TYPE_XELEMENT (gxml_xelement_get_type ())
The type for GXmlxElement.
struct GXmlxElement { GXmlBackedNode parent_instance; GXmlxElementPrivate * priv; };
Represent an XML xElement node, which have attributes and children.
To create one, use
.gxml_xdocument_create_element()
These can have child nodes of various types including other Elements. Elements can have Attr attributes associated with them. Elements have tag names. In addition to methods inherited from Node, Elements have additional methods for manipulating attributes, as an alternative to manipulating the attributes HashMap directly.
Version: DOM Level 1 Core
URL: http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-745549614
struct GXmlxElementClass { GXmlBackedNodeClass parent_class; };
The class structure for GXML_TYPE_XELEMENT
. All the fields in this structure are private and should never be accessed directly.