GXmlXParser

GXmlXParser — GXmlParser implementation using libxml2 engine

Functions

Types and Values

Description

Functions

gxml_xparser_read_node ()

void
gxml_xparser_read_node (GXmlXParser *self,
                        GXmlDomNode *node,
                        GError **error);

Reads a node using current parser.

Parameters

self

the GXmlXParser instance

 

node

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_move_next_node ()

gboolean
gxml_xparser_move_next_node (GXmlXParser *self,
                             GError **error);

Use parser to go to next parsed node.

Parameters

self

the GXmlXParser instance

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_current_is_empty_element ()

gboolean
gxml_xparser_current_is_empty_element (GXmlXParser *self);

Check if current node has childs.

Parameters

self

the GXmlXParser instance

 

gxml_xparser_current_is_element ()

gboolean
gxml_xparser_current_is_element (GXmlXParser *self);

Check if current node found by parser, is a GXmlDomElement

Parameters

self

the GXmlXParser instance

 

gxml_xparser_current_is_document ()

gboolean
gxml_xparser_current_is_document (GXmlXParser *self);

Check if current node found by parser, is a GXmlDomDocument

Parameters

self

the GXmlXParser instance

 

gxml_xparser_current_node_name ()

gchar *
gxml_xparser_current_node_name (GXmlXParser *self);

Returns current node's local name, found by parser.

Parameters

self

the GXmlXParser instance

 

gxml_xparser_create_element ()

GXmlDomElement *
gxml_xparser_create_element (GXmlXParser *self,
                             GXmlDomNode *parent,
                             GError **error);

Creates a new GXmlDomElement and append it as a child of parent.

Parameters

self

the GXmlXParser instance

 

parent

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_read_element ()

void
gxml_xparser_read_element (GXmlXParser *self,
                           GXmlDomElement *element,
                           GError **error);

Reads a GXmlDomElement

Parameters

self

the GXmlXParser instance

 

element

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_read_child_nodes ()

void
gxml_xparser_read_child_nodes (GXmlXParser *self,
                               GXmlDomNode *parent,
                               GError **error);

Iterates in all child nodes and append them to node.

Parameters

self

the GXmlXParser instance

 

parent

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_read_child_node ()

gboolean
gxml_xparser_read_child_node (GXmlXParser *self,
                              GXmlDomNode *parent,
                              GError **error);

Creates a new GXmlDomNode and append it to parent: depending on current node's type found by parser.

If current found node is a GXmlDomElement, it is not parsed. If you want to parse it use gxml_xparser_read_element() method.

Returns: true if node has been created and appended to parent.

Parameters

self

the GXmlXParser instance

 

parent

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_read_child_element ()

gboolean
gxml_xparser_read_child_element (GXmlXParser *self,
                                 GXmlDomNode *parent,
                                 GError **error);

Reads current found element

Parameters

self

the GXmlXParser instance

 

parent

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_read_element_property ()

gboolean
gxml_xparser_read_element_property (GXmlXParser *self,
                                    GXmlDomNode *parent,
                                    GXmlDomNode * *element,
                                    GError **error);

Creates a new GXmlDomElement and append it as a child of parent: for current read node, only if parent: have a property as GXmlDomElement type and current node have same local name as property element.

Returns: true if element is set to a new object and it is set as a child of parent: as a property.

Parameters

self

the GXmlXParser instance

 

parent

 

 

element

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_add_element_collection ()

gboolean
gxml_xparser_add_element_collection (GXmlXParser *self,
                                     GXmlDomNode *parent,
                                     GXmlDomNode * *element,
                                     GError **error);

Creates a new GXmlDomElement and append it as a child of parent: for current read node, only if parent: have a property as GXmlGomCollection type and current node have same local name as collection "items-name"

Returns: true if element is set to a new object, it is set as a child of parent: and has been added to a parent:'s collection property.

Parameters

self

the GXmlXParser instance

 

parent

 

 

element

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_xparser_new ()

GXmlXParser *
gxml_xparser_new (GXmlDomNode *node);

Parameters

node

 

 

Types and Values

GXML_TYPE_XPARSER

#define GXML_TYPE_XPARSER (gxml_xparser_get_type ())

The type for GXmlXParser.


struct GXmlXParser

struct GXmlXParser {
	GObject parent_instance;
	GXmlXParserPrivate * priv;
};
GXmlParser implementation using libxml2 engine

struct GXmlXParserClass

struct GXmlXParserClass {
	GObjectClass parent_class;
};

The class structure for GXML_TYPE_XPARSER. All the fields in this structure are private and should never be accessed directly.

Members