Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

xpath.h File Reference

#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#include <libxml/hash.h>

Go to the source code of this file.

Classes

struct  _xmlNodeSet
struct  _xmlXPathObject
struct  _xmlXPathType
struct  _xmlXPathVariable
struct  _xmlXPathFunct
struct  _xmlXPathAxis
struct  _xmlXPathContext
struct  _xmlXPathParserContext

Defines

#define xmlXPathNodeSetGetLength(ns)   ((ns) ? (ns)->nodeNr : 0)
#define xmlXPathNodeSetItem(ns, index)
#define xmlXPathNodeSetIsEmpty(ns)   (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))

Typedefs

typedef _xmlXPathContext xmlXPathContext
typedef xmlXPathContextxmlXPathContextPtr
typedef _xmlXPathParserContext xmlXPathParserContext
typedef xmlXPathParserContextxmlXPathParserContextPtr
typedef _xmlNodeSet xmlNodeSet
typedef xmlNodeSetxmlNodeSetPtr
typedef _xmlXPathObject xmlXPathObject
typedef xmlXPathObjectxmlXPathObjectPtr
typedef int(* xmlXPathConvertFunc )(xmlXPathObjectPtr obj, int type)
typedef _xmlXPathType xmlXPathType
typedef xmlXPathTypexmlXPathTypePtr
typedef _xmlXPathVariable xmlXPathVariable
typedef xmlXPathVariablexmlXPathVariablePtr
typedef void(* xmlXPathEvalFunc )(xmlXPathParserContextPtr ctxt, int nargs)
typedef _xmlXPathFunct xmlXPathFunct
typedef xmlXPathFunctxmlXPathFuncPtr
typedef xmlXPathObjectPtr(* xmlXPathAxisFunc )(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr cur)
typedef _xmlXPathAxis xmlXPathAxis
typedef xmlXPathAxisxmlXPathAxisPtr
typedef _xmlXPathCompExpr xmlXPathCompExpr
typedef xmlXPathCompExprxmlXPathCompExprPtr
typedef void(* xmlXPathFunction )(xmlXPathParserContextPtr ctxt, int nargs)

Enumerations

enum  xmlXPathError {
  XPATH_EXPRESSION_OK = 0, XPATH_NUMBER_ERROR, XPATH_UNFINISHED_LITERAL_ERROR, XPATH_START_LITERAL_ERROR,
  XPATH_VARIABLE_REF_ERROR, XPATH_UNDEF_VARIABLE_ERROR, XPATH_INVALID_PREDICATE_ERROR, XPATH_EXPR_ERROR,
  XPATH_UNCLOSED_ERROR, XPATH_UNKNOWN_FUNC_ERROR, XPATH_INVALID_OPERAND, XPATH_INVALID_TYPE,
  XPATH_INVALID_ARITY, XPATH_INVALID_CTXT_SIZE, XPATH_INVALID_CTXT_POSITION, XPATH_MEMORY_ERROR,
  XPTR_SYNTAX_ERROR, XPTR_RESOURCE_ERROR, XPTR_SUB_RESOURCE_ERROR, XPATH_UNDEF_PREFIX_ERROR,
  XPATH_ENCODING_ERROR, XPATH_INVALID_CHAR_ERROR
}
enum  xmlXPathObjectType {
  XPATH_UNDEFINED = 0, XPATH_NODESET = 1, XPATH_BOOLEAN = 2, XPATH_NUMBER = 3,
  XPATH_STRING = 4, XPATH_POINT = 5, XPATH_RANGE = 6, XPATH_LOCATIONSET = 7,
  XPATH_USERS = 8, XPATH_XSLT_TREE = 9
}

Functions

XMLPUBFUN int XMLCALL xmlXPathIsNaN (double val)
XMLPUBFUN int XMLCALL xmlXPathIsInf (double val)
XMLPUBFUN void XMLCALL xmlXPathFreeObject (xmlXPathObjectPtr obj)
XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeSetCreate (xmlNodePtr val)
XMLPUBFUN void XMLCALL xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj)
XMLPUBFUN void XMLCALL xmlXPathFreeNodeSet (xmlNodeSetPtr obj)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathObjectCopy (xmlXPathObjectPtr val)
XMLPUBFUN int XMLCALL xmlXPathCmpNodes (xmlNodePtr node1, xmlNodePtr node2)
XMLPUBFUN int XMLCALL xmlXPathCastNumberToBoolean (double val)
XMLPUBFUN int XMLCALL xmlXPathCastStringToBoolean (const xmlChar *val)
XMLPUBFUN int XMLCALL xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns)
XMLPUBFUN int XMLCALL xmlXPathCastToBoolean (xmlXPathObjectPtr val)
XMLPUBFUN double XMLCALL xmlXPathCastBooleanToNumber (int val)
XMLPUBFUN double XMLCALL xmlXPathCastStringToNumber (const xmlChar *val)
XMLPUBFUN double XMLCALL xmlXPathCastNodeToNumber (xmlNodePtr node)
XMLPUBFUN double XMLCALL xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns)
XMLPUBFUN double XMLCALL xmlXPathCastToNumber (xmlXPathObjectPtr val)
XMLPUBFUN xmlChar *XMLCALL xmlXPathCastBooleanToString (int val)
XMLPUBFUN xmlChar *XMLCALL xmlXPathCastNumberToString (double val)
XMLPUBFUN xmlChar *XMLCALL xmlXPathCastNodeToString (xmlNodePtr node)
XMLPUBFUN xmlChar *XMLCALL xmlXPathCastNodeSetToString (xmlNodeSetPtr ns)
XMLPUBFUN xmlChar *XMLCALL xmlXPathCastToString (xmlXPathObjectPtr val)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathConvertBoolean (xmlXPathObjectPtr val)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathConvertNumber (xmlXPathObjectPtr val)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathConvertString (xmlXPathObjectPtr val)
XMLPUBFUN void XMLCALL xmlXPathInit (void)
XMLPUBFUN xmlXPathContextPtr
XMLCALL 
xmlXPathNewContext (xmlDocPtr doc)
XMLPUBFUN void XMLCALL xmlXPathFreeContext (xmlXPathContextPtr ctxt)
XMLPUBFUN long XMLCALL xmlXPathOrderDocElems (xmlDocPtr doc)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathEval (const xmlChar *str, xmlXPathContextPtr ctx)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathEvalExpression (const xmlChar *str, xmlXPathContextPtr ctxt)
XMLPUBFUN int XMLCALL xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, xmlXPathObjectPtr res)
XMLPUBFUN xmlXPathCompExprPtr
XMLCALL 
xmlXPathCompile (const xmlChar *str)
XMLPUBFUN xmlXPathObjectPtr
XMLCALL 
xmlXPathCompiledEval (xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx)
XMLPUBFUN void XMLCALL xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp)

Variables

XMLPUBVAR double xmlXPathNAN
XMLPUBVAR double xmlXPathPINF
XMLPUBVAR double xmlXPathNINF


Define Documentation

#define xmlXPathNodeSetGetLength ns   )     ((ns) ? (ns)->nodeNr : 0)
 

xmlXPathNodeSetGetLength: : a node-set

Implement a functionality similar to the DOM NodeList.length.

Returns the number of nodes in the node-set.

#define xmlXPathNodeSetIsEmpty ns   )     (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
 

xmlXPathNodeSetIsEmpty: : a node-set

Checks whether is empty or not.

Returns TRUE if is an empty node-set.

#define xmlXPathNodeSetItem ns,
index   ) 
 

Value:

((((ns) != NULL) &&                             \
                  ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
                 (ns)->nodeTab[(index)]                         \
                 : NULL)
xmlXPathNodeSetItem: : a node-set : index of a node in the set

Implements a functionality similar to the DOM NodeList.item().

Returns the xmlNodePtr at the given in or NULL if is out of range (0 to length-1)


Typedef Documentation

typedef struct _xmlNodeSet xmlNodeSet
 

typedef xmlNodeSet* xmlNodeSetPtr
 

typedef struct _xmlXPathAxis xmlXPathAxis
 

typedef xmlXPathObjectPtr(* xmlXPathAxisFunc)(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr cur)
 

xmlXPathAxisFunc: : the XPath interpreter context : the previous node being explored on that axis

An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.

Returns the next node in that axis or NULL if at the end of the axis.

typedef xmlXPathAxis* xmlXPathAxisPtr
 

typedef struct _xmlXPathCompExpr xmlXPathCompExpr
 

typedef xmlXPathCompExpr* xmlXPathCompExprPtr
 

typedef struct _xmlXPathContext xmlXPathContext
 

typedef xmlXPathContext* xmlXPathContextPtr
 

typedef int(* xmlXPathConvertFunc)(xmlXPathObjectPtr obj, int type)
 

xmlXPathConvertFunc: : an XPath object : the number of the target type

A conversion function is associated to a type and used to cast the new type to primitive values.

Returns -1 in case of error, 0 otherwise

typedef void(* xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs)
 

xmlXPathEvalFunc: : an XPath parser context : the number of arguments passed to the function

An XPath evaluation function, the parameters are on the XPath context stack.

typedef xmlXPathFunct* xmlXPathFuncPtr
 

typedef struct _xmlXPathFunct xmlXPathFunct
 

typedef void(* xmlXPathFunction)(xmlXPathParserContextPtr ctxt, int nargs)
 

xmlXPathFunction: : the XPath interprestation context : the number of arguments

An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.

typedef struct _xmlXPathObject xmlXPathObject
 

typedef xmlXPathObject* xmlXPathObjectPtr
 

typedef struct _xmlXPathParserContext xmlXPathParserContext
 

typedef xmlXPathParserContext* xmlXPathParserContextPtr
 

typedef struct _xmlXPathType xmlXPathType
 

typedef xmlXPathType* xmlXPathTypePtr
 

typedef struct _xmlXPathVariable xmlXPathVariable
 

typedef xmlXPathVariable* xmlXPathVariablePtr
 


Enumeration Type Documentation

enum xmlXPathError
 

The set of XPath error codes.

Enumeration values:
XPATH_EXPRESSION_OK 
XPATH_NUMBER_ERROR 
XPATH_UNFINISHED_LITERAL_ERROR 
XPATH_START_LITERAL_ERROR 
XPATH_VARIABLE_REF_ERROR 
XPATH_UNDEF_VARIABLE_ERROR 
XPATH_INVALID_PREDICATE_ERROR 
XPATH_EXPR_ERROR 
XPATH_UNCLOSED_ERROR 
XPATH_UNKNOWN_FUNC_ERROR 
XPATH_INVALID_OPERAND 
XPATH_INVALID_TYPE 
XPATH_INVALID_ARITY 
XPATH_INVALID_CTXT_SIZE 
XPATH_INVALID_CTXT_POSITION 
XPATH_MEMORY_ERROR 
XPTR_SYNTAX_ERROR 
XPTR_RESOURCE_ERROR 
XPTR_SUB_RESOURCE_ERROR 
XPATH_UNDEF_PREFIX_ERROR 
XPATH_ENCODING_ERROR 
XPATH_INVALID_CHAR_ERROR 

enum xmlXPathObjectType
 

Enumeration values:
XPATH_UNDEFINED 
XPATH_NODESET 
XPATH_BOOLEAN 
XPATH_NUMBER 
XPATH_STRING 
XPATH_POINT 
XPATH_RANGE 
XPATH_LOCATIONSET 
XPATH_USERS 
XPATH_XSLT_TREE 


Function Documentation

XMLPUBFUN double XMLCALL xmlXPathCastBooleanToNumber int  val  ) 
 

XMLPUBFUN xmlChar* XMLCALL xmlXPathCastBooleanToString int  val  ) 
 

XMLPUBFUN int XMLCALL xmlXPathCastNodeSetToBoolean xmlNodeSetPtr  ns  ) 
 

XMLPUBFUN double XMLCALL xmlXPathCastNodeSetToNumber xmlNodeSetPtr  ns  ) 
 

XMLPUBFUN xmlChar* XMLCALL xmlXPathCastNodeSetToString xmlNodeSetPtr  ns  ) 
 

XMLPUBFUN double XMLCALL xmlXPathCastNodeToNumber xmlNodePtr  node  ) 
 

XMLPUBFUN xmlChar* XMLCALL xmlXPathCastNodeToString xmlNodePtr  node  ) 
 

XMLPUBFUN int XMLCALL xmlXPathCastNumberToBoolean double  val  ) 
 

Conversion functions to basic types.

XMLPUBFUN xmlChar* XMLCALL xmlXPathCastNumberToString double  val  ) 
 

XMLPUBFUN int XMLCALL xmlXPathCastStringToBoolean const xmlChar val  ) 
 

XMLPUBFUN double XMLCALL xmlXPathCastStringToNumber const xmlChar val  ) 
 

XMLPUBFUN int XMLCALL xmlXPathCastToBoolean xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN double XMLCALL xmlXPathCastToNumber xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN xmlChar* XMLCALL xmlXPathCastToString xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN int XMLCALL xmlXPathCmpNodes xmlNodePtr  node1,
xmlNodePtr  node2
 

XMLPUBFUN xmlXPathCompExprPtr XMLCALL xmlXPathCompile const xmlChar str  ) 
 

Separate compilation/evaluation entry points.

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathCompiledEval xmlXPathCompExprPtr  comp,
xmlXPathContextPtr  ctx
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertBoolean xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertNumber xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathConvertString xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathEval const xmlChar str,
xmlXPathContextPtr  ctx
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathEvalExpression const xmlChar str,
xmlXPathContextPtr  ctxt
 

XMLPUBFUN int XMLCALL xmlXPathEvalPredicate xmlXPathContextPtr  ctxt,
xmlXPathObjectPtr  res
 

XMLPUBFUN void XMLCALL xmlXPathFreeCompExpr xmlXPathCompExprPtr  comp  ) 
 

XMLPUBFUN void XMLCALL xmlXPathFreeContext xmlXPathContextPtr  ctxt  ) 
 

XMLPUBFUN void XMLCALL xmlXPathFreeNodeSet xmlNodeSetPtr  obj  ) 
 

XMLPUBFUN void XMLCALL xmlXPathFreeNodeSetList xmlXPathObjectPtr  obj  ) 
 

XMLPUBFUN void XMLCALL xmlXPathFreeObject xmlXPathObjectPtr  obj  ) 
 

XMLPUBFUN void XMLCALL xmlXPathInit void   ) 
 

Context handling.

XMLPUBFUN int XMLCALL xmlXPathIsInf double  val  ) 
 

XMLPUBFUN int XMLCALL xmlXPathIsNaN double  val  ) 
 

XMLPUBFUN xmlXPathContextPtr XMLCALL xmlXPathNewContext xmlDocPtr  doc  ) 
 

XMLPUBFUN xmlNodeSetPtr XMLCALL xmlXPathNodeSetCreate xmlNodePtr  val  ) 
 

XMLPUBFUN xmlXPathObjectPtr XMLCALL xmlXPathObjectCopy xmlXPathObjectPtr  val  ) 
 

XMLPUBFUN long XMLCALL xmlXPathOrderDocElems xmlDocPtr  doc  ) 
 

Evaluation functions.


Variable Documentation

XMLPUBVAR double xmlXPathNAN
 

Objects and Nodesets handling

XMLPUBVAR double xmlXPathNINF
 

XMLPUBVAR double xmlXPathPINF
 


Generated on Wed Mar 16 00:10:30 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1