GXmlxNodeList

GXmlxNodeList — DOM API. Interface to access a list of nodes.

Functions

Types and Values

Description

A live list used to store GXmlxNodes.

Usually contains the children of a GXmlxNode, or the results of gxml_xelement_get_elements_by_tag_name(). GXmlNodeList implements both the DOM Level 1 Core API for a NodeList, as well as the GList API, to make it more accessible and familiar to GLib programmers. Implementing classes also implement GeeIterable, to make iteration in supporting languages (like Vala) nice and easy.

Version: DOM Level 1 Core

URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-536297177

Functions

gxml_xnode_list_item ()

GXmlxNode *
gxml_xnode_list_item (GXmlxNodeList *self,
                      gulong idx);

Access the idx'th item in the list.

Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#method-item

Parameters

self

the GXmlxNodeList instance

 

idx

 

 

gxml_xnode_list_insert_before ()

GXmlxNode *
gxml_xnode_list_insert_before (GXmlxNodeList *self,
                               GXmlxNode *new_child,
                               GXmlxNode *ref_child);

Parameters

self

the GXmlxNodeList instance

 

new_child

 

 

ref_child

 

 

gxml_xnode_list_replace_child ()

GXmlxNode *
gxml_xnode_list_replace_child (GXmlxNodeList *self,
                               GXmlxNode *new_child,
                               GXmlxNode *old_child);

Parameters

self

the GXmlxNodeList instance

 

new_child

 

 

old_child

 

 

gxml_xnode_list_remove_child ()

GXmlxNode *
gxml_xnode_list_remove_child (GXmlxNodeList *self,
                              GXmlxNode *old_child);

Parameters

self

the GXmlxNodeList instance

 

old_child

 

 

gxml_xnode_list_append_child ()

GXmlxNode *
gxml_xnode_list_append_child (GXmlxNodeList *self,
                              GXmlxNode *new_child);

Parameters

self

the GXmlxNodeList instance

 

new_child

 

 

gxml_xnode_list_to_string ()

gchar *
gxml_xnode_list_to_string (GXmlxNodeList *self,
                           gboolean in_line);

Creates an XML string representation of the nodes in the list.

todo: write a test

Parameters

self

the GXmlxNodeList instance

 

in_line

 .

Whether to parse and expand entities or not

.

[in]

Returns

The list as an XML string


gxml_xnode_list_first ()

GXmlxNode *
gxml_xnode_list_first (GXmlxNodeList *self);

Retrieve the first node in the list. Like g_list_first().

Parameters

self

the GXmlxNodeList instance

 

gxml_xnode_list_last ()

GXmlxNode *
gxml_xnode_list_last (GXmlxNodeList *self);

Retrieve the last node in the list. Like g_list_last().

Parameters

self

the GXmlxNodeList instance

 

gxml_xnode_list_get ()

GXmlxNode *
gxml_xnode_list_get (GXmlxNodeList *self,
                     gint n);

Obtain the n'th item in the list. Like g_list_nth().

Parameters

self

the GXmlxNodeList instance

 

n

 .

The index of the item to access

.

[in]

gxml_xnode_list_get_length ()

gulong
gxml_xnode_list_get_length (GXmlxNodeList *self);

Get and return the current value of the "length" property.

The number of nodes contained within this list

Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#attribute-length

Parameters

self

the GXmlxNodeList instance to query

 

Returns

the value of the "length" property


gxml_xnode_list_set_length ()

void
gxml_xnode_list_set_length (GXmlxNodeList *self,
                            gulong value);

Set the value of the "length" property to value .

The number of nodes contained within this list

Version: DOM Level 1 Core URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#attribute-length

Parameters

self

the GXmlxNodeList instance to modify

 

value

the new value of the "length" property

 

Types and Values

GXmlxNodeList

typedef struct _GXmlxNodeList GXmlxNodeList;

DOM API. Interface to access a list of nodes.

A live list used to store GXmlxNodes.

Usually contains the children of a GXmlxNode, or the results of gxml_xelement_get_elements_by_tag_name(). GXmlNodeList implements both the DOM Level 1 Core API for a NodeList, as well as the GList API, to make it more accessible and familiar to GLib programmers. Implementing classes also implement GeeIterable, to make iteration in supporting languages (like Vala) nice and easy.

Version: DOM Level 1 Core

URL: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-536297177


struct GXmlxNodeListIface

struct GXmlxNodeListIface {
	GTypeInterface parent_iface;
	GXmlxNode* (*item) (GXmlxNodeList* self, gulong idx);
	GXmlxNode* (*insert_before) (GXmlxNodeList* self, GXmlxNode* new_child, GXmlxNode* ref_child);
	GXmlxNode* (*replace_child) (GXmlxNodeList* self, GXmlxNode* new_child, GXmlxNode* old_child);
	GXmlxNode* (*remove_child) (GXmlxNodeList* self, GXmlxNode* old_child);
	GXmlxNode* (*append_child) (GXmlxNodeList* self, GXmlxNode* new_child);
	gchar* (*to_string) (GXmlxNodeList* self, gboolean in_line);
	GXmlxNode* (*first) (GXmlxNodeList* self);
	GXmlxNode* (*last) (GXmlxNodeList* self);
	GXmlxNode* (*get) (GXmlxNodeList* self, gint n);
	gulong (*get_length) (GXmlxNodeList* self);
	void (*set_length) (GXmlxNodeList* self, gulong value);
};

Interface for creating GXmlxNodeList implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

item ()

virtual method called by gxml_xnode_list_item()

 

insert_before ()

virtual method called by gxml_xnode_list_insert_before()

 

replace_child ()

virtual method called by gxml_xnode_list_replace_child()

 

remove_child ()

virtual method called by gxml_xnode_list_remove_child()

 

append_child ()

virtual method called by gxml_xnode_list_append_child()

 

to_string ()

virtual method called by gxml_xnode_list_to_string()

 

first ()

virtual method called by gxml_xnode_list_first()

 

last ()

virtual method called by gxml_xnode_list_last()

 

get ()

   

get_length ()

getter method for the abstract property "length"

 

set_length ()

setter method for the abstract property "length"