GXmlXPathContext

GXmlXPathContext

Functions

Types and Values

Description

Functions

gxml_xpath_context_evaluate ()

GXmlXPathObject *
gxml_xpath_context_evaluate (GXmlXPathContext *self,
                             const gchar *expression,
                             GeeList *resolver,
                             GError **error);

Evaluate XPath expression.

This method evaluates provided expression, registers provided namespaces in resolver and returns an GXmlXPathObject.

Throw GXmlXPathError if one of provided namespaces is invalid.

Parameters

self

the GXmlXPathContext instance

 

expression

 

 

resolver

 

 

error

location to store the error occuring, or NULL to ignore.

[error-domains GXmlXPathError]

gxml_xpath_object_get_object_type ()

GXmlXPathObjectType
gxml_xpath_object_get_object_type (GXmlXPathObject *self);

Get and return the current value of the "object-type" property.

Parameters

self

the GXmlXPathObject instance to query

 

Returns

the value of the "object-type" property


gxml_xpath_object_get_boolean_value ()

gboolean
gxml_xpath_object_get_boolean_value (GXmlXPathObject *self);

Get and return the current value of the "boolean-value" property.

Parameters

self

the GXmlXPathObject instance to query

 

Returns

the value of the "boolean-value" property


gxml_xpath_object_get_string_value ()

const gchar *
gxml_xpath_object_get_string_value (GXmlXPathObject *self);

Get and return the current value of the "string-value" property.

Parameters

self

the GXmlXPathObject instance to query

 

Returns

the value of the "string-value" property


gxml_xpath_object_get_number_value ()

gdouble
gxml_xpath_object_get_number_value (GXmlXPathObject *self);

Get and return the current value of the "number-value" property.

Parameters

self

the GXmlXPathObject instance to query

 

Returns

the value of the "number-value" property


gxml_xpath_object_get_nodeset ()

GXmlDomHTMLCollection *
gxml_xpath_object_get_nodeset (GXmlXPathObject *self);

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

Parameters

self

the GXmlXPathObject instance to query

 

Returns

the value of the "nodeset" property

Types and Values

enum GXmlXPathObjectType

Members

GXML_XPATH_OBJECT_TYPE_UNDEFINED

   

GXML_XPATH_OBJECT_TYPE_NODESET

   

GXML_XPATH_OBJECT_TYPE_BOOLEAN

   

GXML_XPATH_OBJECT_TYPE_NUMBER

   

GXML_XPATH_OBJECT_TYPE_STRING

   

GXML_XPATH_OBJECT_TYPE_POINT

   

GXML_XPATH_OBJECT_TYPE_RANGE

   

GXML_XPATH_OBJECT_TYPE_LOCATIONSET

   

GXML_XPATH_OBJECT_TYPE_USERS

   

GXML_XPATH_OBJECT_TYPE_XSLT_TREE

   

enum GXmlXPathError

Members

GXML_XPATH_ERROR_EXPRESSION_OK

   

GXML_XPATH_ERROR_NUMBER_ERROR

   

GXML_XPATH_ERROR_UNFINISHED_LITERAL_ERROR

   

GXML_XPATH_ERROR_START_LITERAL_ERROR

   

GXML_XPATH_ERROR_VARIABLE_REF_ERROR

   

GXML_XPATH_ERROR_UNDEF_VARIABLE_ERROR

   

GXML_XPATH_ERROR_INVALID_PREDICATE_ERROR

   

GXML_XPATH_ERROR_EXPR_ERROR

   

GXML_XPATH_ERROR_UNCLOSED_ERROR

   

GXML_XPATH_ERROR_UNKNOWN_FUNC_ERROR

   

GXML_XPATH_ERROR_INVALID_OPERAND

   

GXML_XPATH_ERROR_INVALID_TYPE

   

GXML_XPATH_ERROR_INVALID_ARITY

   

GXML_XPATH_ERROR_INVALID_CTXT_SIZE

   

GXML_XPATH_ERROR_INVALID_CTXT_POSITION

   

GXML_XPATH_ERROR_MEMORY_ERROR

   

GXML_XPATH_ERROR_XPTR_SYNTAX_ERROR

   

GXML_XPATH_ERROR_XPTR_RESOURCE_ERROR

   

GXML_XPATH_ERROR_XPTR_SUB_RESOURCE_ERROR

   

GXML_XPATH_ERROR_UNDEF_PREFIX_ERROR

   

GXML_XPATH_ERROR_ENCODING_ERROR

   

GXML_XPATH_ERROR_INVALID_CHAR_ERROR

   

GXML_XPATH_ERROR_INVALID_CTXT

   

GXmlXPathContext

typedef struct _GXmlXPathContext GXmlXPathContext;

struct GXmlXPathContextIface

struct GXmlXPathContextIface {
	GTypeInterface parent_iface;
	GXmlXPathObject* (*evaluate) (GXmlXPathContext* self, const gchar* expression, GeeList* resolver, GError** error);
};

Interface for creating GXmlXPathContext implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

evaluate ()

virtual method called by gxml_xpath_context_evaluate()

 

GXmlXPathObject

typedef struct _GXmlXPathObject GXmlXPathObject;

struct GXmlXPathObjectIface

struct GXmlXPathObjectIface {
	GTypeInterface parent_iface;
	GXmlXPathObjectType (*get_object_type) (GXmlXPathObject* self);
	gboolean (*get_boolean_value) (GXmlXPathObject* self);
	const gchar* (*get_string_value) (GXmlXPathObject* self);
	gdouble (*get_number_value) (GXmlXPathObject* self);
	GXmlDomHTMLCollection* (*get_nodeset) (GXmlXPathObject* self);
};

Interface for creating GXmlXPathObject implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

get_object_type ()

getter method for the abstract property "object-type"

 

get_boolean_value ()

getter method for the abstract property "boolean-value"

 

get_string_value ()

getter method for the abstract property "string-value"

 

get_number_value ()

getter method for the abstract property "number-value"

 

get_nodeset ()

getter method for the abstract property "nodeset"