Gdome2 Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GdomeXPathResult

## Name

GdomeXPathResult -- Interface XPathResult implementation.

## Synopsis

    struct      GdomeXPathResult;
    void        gdome_xpresult_ref              (GdomeXPathResult *self,
                                                 GdomeException *exc);
    void        gdome_xpresult_unref            (GdomeXPathResult *self,
                                                 GdomeException *exc);
    unsigned short gdome_xpresult_resultType    (GdomeXPathResult *self,
                                                 GdomeException *exc);
    GdomeBoolean gdome_xpresult_booleanValue    (GdomeXPathResult *self,
                                                 GdomeException *exc);
    double      gdome_xpresult_numberValue      (GdomeXPathResult *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_xpresult_singleNodeValue  (GdomeXPathResult *self,
                                                 GdomeException *exc);
    GdomeDOMString* gdome_xpresult_stringValue  (GdomeXPathResult *self,
                                                 GdomeException *exc);
    GdomeNode*  gdome_xpresult_iterateNext      (GdomeXPathResult *self,
                                                 GdomeException *exc);

## Description

This implements the DOM Level 3 XPath W3C Working Draft 08 February 2002. API SUBJECT TO CHANGE!

The GdomeXPathResult interface represents the result of the evaluation of an XPath expression within the context of a particular node. Since evaluation of an XPath expression can result in various result types, this object makes it possible to discover and manipulate the type and value of the result.

## Details

### struct GdomeXPathResult

    struct GdomeXPathResult {
    	gpointer user_data;
    };

### gdome_xpresult_ref ()

    void        gdome_xpresult_ref              (GdomeXPathResult *self,
                                                 GdomeException *exc);

Increase the reference count of the XPathResult structure.

`self` : | XPathResult Object ref
`exc` : | Exception Object ref

### gdome_xpresult_unref ()

    void        gdome_xpresult_unref            (GdomeXPathResult *self,
                                                 GdomeException *exc);

Decrease the reference count of the XPathResult. Free the structure if XPathResult will have zero reference.

`self` : | XPathResult Object ref
`exc` : | Exception Object ref

### gdome_xpresult_resultType ()

    unsigned short gdome_xpresult_resultType    (GdomeXPathResult *self,
                                                 GdomeException *exc);

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | a code representing the type of this result, as defined by the type constants.

### gdome_xpresult_booleanValue ()

    GdomeBoolean gdome_xpresult_booleanValue    (GdomeXPathResult *self,
                                                 GdomeException *exc);

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | the value of this boolean result.

### gdome_xpresult_numberValue ()

    double      gdome_xpresult_numberValue      (GdomeXPathResult *self,
                                                 GdomeException *exc);

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | the value of this number result.

### gdome_xpresult_singleNodeValue ()

    GdomeNode*  gdome_xpresult_singleNodeValue  (GdomeXPathResult *self,
                                                 GdomeException *exc);

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | The value of this single node result, which may be `NULL`. This result is not guaranteed to be the first node in document order where the expression evaluates to multiple nodes.

### gdome_xpresult_stringValue ()

    GdomeDOMString* gdome_xpresult_stringValue  (GdomeXPathResult *self,
                                                 GdomeException *exc);

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | the value of this GdomeDOMString result.

### gdome_xpresult_iterateNext ()

    GdomeNode*  gdome_xpresult_iterateNext      (GdomeXPathResult *self,
                                                 GdomeException *exc);

Iterates and returns the next node from the node set or `NULL` if there are no more nodes.

`self` : | GdomeXPathResult Object ref
`exc` : | Exception Object ref
Returns : | the next node.

<<< Previous Page | Home | Up | Next Page >>>
GdomeXPathNSResolver | Memory Management System