![]() | ![]() | ![]() | Gnome XML Library Reference Manual | ![]() |
---|
xpathInternals —
#define xmlXPathSetError (ctxt, err) #define xmlXPathSetArityError (ctxt) #define xmlXPathSetTypeError (ctxt) #define xmlXPathGetError (ctxt) #define xmlXPathCheckError (ctxt) #define xmlXPathGetDocument (ctxt) #define xmlXPathGetContextNode (ctxt) int xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);double xmlXPathPopNumber (xmlXPathParserContextPtr ctxt); xmlChar* xmlXPathPopString (xmlXPathParserContextPtr ctxt); xmlNodeSetPtr xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt); void* xmlXPathPopExternal (xmlXPathParserContextPtr ctxt); #define xmlXPathReturnBoolean (ctxt, val) #define xmlXPathReturnTrue (ctxt) #define xmlXPathReturnFalse (ctxt) #define xmlXPathReturnNumber (ctxt, val) #define xmlXPathReturnString (ctxt, str) #define xmlXPathReturnEmptyString (ctxt) #define xmlXPathReturnNodeSet (ctxt, ns) #define xmlXPathReturnEmptyNodeSet (ctxt) #define xmlXPathReturnExternal (ctxt, val) #define xmlXPathStackIsNodeSet (ctxt) #define xmlXPathStackIsExternal (ctxt) #define xmlXPathEmptyNodeSet (ns) #define CHECK_ERROR #define CHECK_ERROR0 #define XP_ERROR (X) #define XP_ERROR0 (X) #define CHECK_TYPE (typeval) #define CHECK_TYPE0 (typeval) #define CHECK_ARITY (x) #define CAST_TO_STRING #define CAST_TO_NUMBER #define CAST_TO_BOOLEAN xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt, xmlXPathVariableLookupFunc f, void *data); xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt); void xmlXPatherror (xmlXPathParserContextPtr ctxt, const char *file, int line, int no); void xmlXPathDebugDumpObject (FILE *output, xmlXPathObjectPtr cur, int depth); void xmlXPathDebugDumpCompExpr (FILE *output, xmlXPathCompExprPtr comp, int depth); int xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val); xmlNodeSetPtr xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathDistinctSorted (xmlNodeSetPtr nodes); xmlNodeSetPtr xmlXPathDistinct (xmlNodeSetPtr nodes); int xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, xmlNodePtr node); xmlNodeSetPtr xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathNodeLeading (xmlNodeSetPtr nodes, xmlNodePtr node); xmlNodeSetPtr xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, xmlNodePtr node); xmlNodeSetPtr xmlXPathTrailingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); xmlNodeSetPtr xmlXPathNodeTrailing (xmlNodeSetPtr nodes, xmlNodePtr node); xmlNodeSetPtr xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2); int xmlXPathRegisterNs (xmlXPathContextPtr ctxt, const xmlChar *prefix, const xmlChar *ns_uri); const xmlChar* xmlXPathNsLookup (xmlXPathContextPtr ctxt, const xmlChar *prefix); void xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt); int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathFunction f); int xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathFunction f); int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathObjectPtr value); int xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObjectPtr value); xmlXPathFunction xmlXPathFunctionLookup (xmlXPathContextPtr ctxt, const xmlChar *name); xmlXPathFunction xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); void xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt); xmlXPathObjectPtr xmlXPathVariableLookup (xmlXPathContextPtr ctxt, const xmlChar *name); xmlXPathObjectPtr xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); void xmlXPathRegisteredVariablesCleanup (xmlXPathContextPtr ctxt); xmlXPathParserContextPtr xmlXPathNewParserContext (const xmlChar *str, xmlXPathContextPtr ctxt); void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); xmlXPathObjectPtr valuePop (xmlXPathParserContextPtr ctxt); int valuePush (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value); xmlXPathObjectPtr xmlXPathNewString (const xmlChar *val); xmlXPathObjectPtr xmlXPathNewCString (const char *val); xmlXPathObjectPtr xmlXPathWrapString (xmlChar *val); xmlXPathObjectPtr xmlXPathWrapCString (char *val); xmlXPathObjectPtr xmlXPathNewFloat (double val); xmlXPathObjectPtr xmlXPathNewBoolean (int val); xmlXPathObjectPtr xmlXPathNewNodeSet (xmlNodePtr val); xmlXPathObjectPtr xmlXPathNewValueTree (xmlNodePtr val); void xmlXPathNodeSetAdd (xmlNodeSetPtr cur, xmlNodePtr val); void xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur, xmlNodePtr val); void xmlXPathNodeSetAddNs (xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns); void xmlXPathNodeSetSort (xmlNodeSetPtr set); void xmlXPathRoot (xmlXPathParserContextPtr ctxt); void xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt); xmlChar* xmlXPathParseName (xmlXPathParserContextPtr ctxt); xmlChar* xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);double xmlXPathStringEvalNumber (const xmlChar *str); int xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res); void xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt); xmlNodeSetPtr xmlXPathNodeSetMerge (xmlNodeSetPtr val1, xmlNodeSetPtr val2); void xmlXPathNodeSetDel (xmlNodeSetPtr cur, xmlNodePtr val); void xmlXPathNodeSetRemove (xmlNodeSetPtr cur, int val); xmlXPathObjectPtr xmlXPathNewNodeSetList (xmlNodeSetPtr val); xmlXPathObjectPtr xmlXPathWrapNodeSet (xmlNodeSetPtr val); xmlXPathObjectPtr xmlXPathWrapExternal (void *val); int xmlXPathEqualValues (xmlXPathParserContextPtr ctxt); int xmlXPathNotEqualValues (xmlXPathParserContextPtr ctxt); int xmlXPathCompareValues (xmlXPathParserContextPtr ctxt, int inf, int strict); void xmlXPathValueFlipSign (xmlXPathParserContextPtr ctxt); void xmlXPathAddValues (xmlXPathParserContextPtr ctxt); void xmlXPathSubValues (xmlXPathParserContextPtr ctxt); void xmlXPathMultValues (xmlXPathParserContextPtr ctxt); void xmlXPathDivValues (xmlXPathParserContextPtr ctxt); void xmlXPathModValues (xmlXPathParserContextPtr ctxt); int xmlXPathIsNodeType (const xmlChar *name); xmlNodePtr xmlXPathNextSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextChild (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextDescendant (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextDescendantOrSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextParent (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextAncestorOrSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextFollowingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextFollowing (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextNamespace (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextAttribute (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextPreceding (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextAncestor (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); xmlNodePtr xmlXPathNextPrecedingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur); void xmlXPathLastFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathPositionFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathCountFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathIdFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathLocalNameFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathNamespaceURIFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathStringFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathStringLengthFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathConcatFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathContainsFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathStartsWithFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathSubstringFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathSubstringBeforeFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathSubstringAfterFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathNormalizeFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathTranslateFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathNotFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathTrueFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathFalseFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathLangFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathNumberFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathSumFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathFloorFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathCeilingFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathRoundFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathBooleanFunction (xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathNodeSetFreeNs (xmlNsPtr ns);
#define xmlXPathSetArityError(ctxt)
Raises an XPATH_INVALID_ARITY error.
ctxt : |
#define xmlXPathGetContextNode(ctxt)
Get the context node of an XPath context.
ctxt : |
int xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
Pops a boolean from the stack, handling conversion if needed. Check error with xmlXPathCheckError.
ctxt : | |
Returns : |
double xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
Pops a number from the stack, handling conversion if needed. Check error with xmlXPathCheckError.
ctxt : | |
Returns : |
xmlChar* xmlXPathPopString (xmlXPathParserContextPtr ctxt);
Pops a string from the stack, handling conversion if needed. Check error with xmlXPathCheckError.
ctxt : | |
Returns : |
xmlNodeSetPtr xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
Pops a node-set from the stack, handling conversion if needed. Check error with xmlXPathCheckError.
ctxt : | |
Returns : |
void* xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
Pops an external object from the stack, handling conversion if needed. Check error with xmlXPathCheckError.
ctxt : |
#define xmlXPathReturnBoolean(ctxt, val)
Pushes the boolean val on the context stack.
ctxt : | |
val : |
#define xmlXPathReturnNumber(ctxt, val)
Pushes the double val on the context stack.
ctxt : | |
val : |
#define xmlXPathReturnString(ctxt, str)
Pushes the string str on the context stack.
ctxt : | |
str : |
#define xmlXPathReturnEmptyString(ctxt)
Pushes an empty string on the stack.
ctxt : |
#define xmlXPathReturnNodeSet(ctxt, ns)
Pushes the node-set ns on the context stack.
ctxt : | |
ns : |
#define xmlXPathReturnEmptyNodeSet(ctxt)
Pushes an empty node-set on the context stack.
ctxt : |
#define xmlXPathReturnExternal(ctxt, val)
Pushes user data on the context stack.
ctxt : | |
val : |
#define xmlXPathStackIsNodeSet(ctxt)
Check if the current value on the XPath stack is a node set or an XSLT value tree.
ctxt : |
#define xmlXPathStackIsExternal(ctxt)
Checks if the current value on the XPath stack is an external object.
ctxt : |
#define CHECK_ERROR0
Macro to return 0 from the function if an XPath error was detected.
#define CHECK_TYPE(typeval)
Macro to check that the value on top of the XPath stack is of a given type.
typeval : |
#define CHECK_TYPE0(typeval)
Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure
typeval : |
#define CHECK_ARITY(x)
Macro to check that the number of args passed to an XPath function matches.
x : |
#define CAST_TO_STRING
Macro to try to cast the value on the top of the XPath stack to a string.
#define CAST_TO_NUMBER
Macro to try to cast the value on the top of the XPath stack to a number.
#define CAST_TO_BOOLEAN
Macro to try to cast the value on the top of the XPath stack to a boolean.
xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri);
Prototype for callbacks used to plug variable lookup in the XPath engine.
ctxt : | |
name : | |
ns_uri : | |
Returns : |
void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt, xmlXPathVariableLookupFunc f, void *data);
register an external mechanism to do variable lookup
ctxt : | |
f : | |
data : |
xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri);
Prototype for callbacks used to plug function lookup in the XPath engine.
ctxt : | |
name : | |
ns_uri : | |
Returns : |
void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt);
Registers an external mechanism to do function lookup.
ctxt : | |
f : | |
funcCtxt : |
void xmlXPatherror (xmlXPathParserContextPtr ctxt, const char *file, int line, int no);
Formats an error message.
ctxt : | |
file : | |
line : | |
no : |
void xmlXPathDebugDumpObject (FILE *output, xmlXPathObjectPtr cur, int depth);
Dump the content of the object for debugging purposes
output : | |
cur : | |
depth : |
void xmlXPathDebugDumpCompExpr (FILE *output, xmlXPathCompExprPtr comp, int depth);
Dumps the tree of the compiled XPath expression.
output : | |
comp : | |
depth : |
int xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val);
checks whether cur contains val
cur : | |
val : | |
Returns : |
xmlNodeSetPtr xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
Implements the EXSLT - Sets
nodes : | |
Returns : |
xmlNodeSetPtr xmlXPathDistinct (xmlNodeSetPtr nodes);
Implements the EXSLT - Sets
nodes : | |
Returns : |
int xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, xmlNodePtr node);
Implements the EXSLT - Sets
nodes : | |
node : | |
Returns : |
xmlNodeSetPtr xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathNodeLeading (xmlNodeSetPtr nodes, xmlNodePtr node);
Implements the EXSLT - Sets
nodes : | |
node : | |
Returns : |
xmlNodeSetPtr xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, xmlNodePtr node);
Implements the EXSLT - Sets
nodes : | |
node : | |
Returns : |
xmlNodeSetPtr xmlXPathTrailingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
xmlNodeSetPtr xmlXPathNodeTrailing (xmlNodeSetPtr nodes, xmlNodePtr node);
Implements the EXSLT - Sets
nodes : | |
node : | |
Returns : |
xmlNodeSetPtr xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2);
Implements the EXSLT - Sets
nodes1 : | |
nodes2 : | |
Returns : |
int xmlXPathRegisterNs (xmlXPathContextPtr ctxt, const xmlChar *prefix, const xmlChar *ns_uri);
Register a new namespace. If ns_uri is NULL it unregisters the namespace
ctxt : | |
prefix : | |
ns_uri : | |
Returns : |
const xmlChar* xmlXPathNsLookup (xmlXPathContextPtr ctxt, const xmlChar *prefix);
Search in the namespace declaration array of the context for the given namespace name associated to the given prefix
ctxt : | |
prefix : | |
Returns : |
void xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
Cleanup the XPath context data associated to registered variables
ctxt : |
int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathFunction f);
Register a new function. If f is NULL it unregisters the function
ctxt : | |
name : | |
f : | |
Returns : |
int xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathFunction f);
Register a new function. If f is NULL it unregisters the function
ctxt : | |
name : | |
ns_uri : | |
f : | |
Returns : |
int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, const xmlChar *name, xmlXPathObjectPtr value);
Register a new variable value. If value is NULL it unregisters the variable
ctxt : | |
name : | |
value : | |
Returns : |
int xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObjectPtr value);
Register a new variable value. If value is NULL it unregisters the variable
ctxt : | |
name : | |
ns_uri : | |
value : | |
Returns : |
xmlXPathFunction xmlXPathFunctionLookup (xmlXPathContextPtr ctxt, const xmlChar *name);
Search in the Function array of the context for the given function.
ctxt : | |
name : | |
Returns : |
xmlXPathFunction xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri);
Search in the Function array of the context for the given function.
ctxt : | |
name : | |
ns_uri : | |
Returns : |
void xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
Cleanup the XPath context data associated to registered functions
ctxt : |
xmlXPathObjectPtr xmlXPathVariableLookup (xmlXPathContextPtr ctxt, const xmlChar *name);
Search in the Variable array of the context for the given variable value.
ctxt : | |
name : | |
Returns : |
xmlXPathObjectPtr xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri);
Search in the Variable array of the context for the given variable value.
ctxt : | |
name : | |
ns_uri : | |
Returns : |
void xmlXPathRegisteredVariablesCleanup (xmlXPathContextPtr ctxt);
Cleanup the XPath context data associated to registered variables
ctxt : |
xmlXPathParserContextPtr xmlXPathNewParserContext (const xmlChar *str, xmlXPathContextPtr ctxt);
Create a new xmlXPathParserContext
str : | |
ctxt : | |
Returns : |
void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
Free up an xmlXPathParserContext
ctxt : |
xmlXPathObjectPtr valuePop (xmlXPathParserContextPtr ctxt);
Pops the top XPath object from the value stack
ctxt : | |
Returns : |
int valuePush (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value);
Pushes a new XPath object on top of the value stack
ctxt : | |
value : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewString (const xmlChar *val);
Create a new xmlXPathObjectPtr of type string and of value val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewCString (const char *val);
Create a new xmlXPathObjectPtr of type string and of value val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathWrapString (xmlChar *val);
Wraps the val string into an XPath object.
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathWrapCString (char *val);
Wraps a string into an XPath object.
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewFloat (double val);
Create a new xmlXPathObjectPtr of type double and of value val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewBoolean (int val);
Create a new xmlXPathObjectPtr of type boolean and of value val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewNodeSet (xmlNodePtr val);
Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathNewValueTree (xmlNodePtr val);
Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root val
val : | |
Returns : |
void xmlXPathNodeSetAdd (xmlNodeSetPtr cur, xmlNodePtr val);
add a new xmlNodePtr to an existing NodeSet
cur : | |
val : |
void xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur, xmlNodePtr val);
add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.
cur : | |
val : |
void xmlXPathNodeSetAddNs (xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns);
add a new namespace node to an existing NodeSet
cur : | |
node : | |
ns : |
void xmlXPathNodeSetSort (xmlNodeSetPtr set);
Sort the node set in document order
set : |
void xmlXPathRoot (xmlXPathParserContextPtr ctxt);
Initialize the context to the root of the document
ctxt : |
void xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
Parse and evaluate an XPath expression in the given context, then push the result on the context stack
ctxt : |
xmlChar* xmlXPathParseName (xmlXPathParserContextPtr ctxt);
parse an XML name
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '_' | ':') (NameChar)*
ctxt : | |
Returns : |
xmlChar* xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
parse an XML namespace non qualified name.
[NS 3] NCName ::= (Letter | '_') (NCNameChar)*
[NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
ctxt : | |
Returns : |
double xmlXPathStringEvalNumber (const xmlChar *str);
[30a] Float ::= Number ('e' Digits?)?
[30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+
Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number.
str : | |
Returns : |
int xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res);
Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.
ctxt : | |
res : | |
Returns : |
void xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
Registers all default XPath functions in this context
ctxt : |
xmlNodeSetPtr xmlXPathNodeSetMerge (xmlNodeSetPtr val1, xmlNodeSetPtr val2);
Merges two nodesets, all nodes from val2 are added to val1 if val1 is NULL, a new set is created and copied from val2
val1 : | |
val2 : | |
Returns : |
void xmlXPathNodeSetDel (xmlNodeSetPtr cur, xmlNodePtr val);
Removes an xmlNodePtr from an existing NodeSet
cur : | |
val : |
void xmlXPathNodeSetRemove (xmlNodeSetPtr cur, int val);
Removes an entry from an existing NodeSet list.
cur : | |
val : |
xmlXPathObjectPtr xmlXPathNewNodeSetList (xmlNodeSetPtr val);
Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset val
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathWrapNodeSet (xmlNodeSetPtr val);
Wrap the Nodeset val in a new xmlXPathObjectPtr
val : | |
Returns : |
xmlXPathObjectPtr xmlXPathWrapExternal (void *val);
Wraps the val data into an XPath object.
val : | |
Returns : |
int xmlXPathEqualValues (xmlXPathParserContextPtr ctxt);
Implement the equal operation on XPath objects content: arg1 == arg2
ctxt : | |
Returns : |
int xmlXPathNotEqualValues (xmlXPathParserContextPtr ctxt);
Implement the equal operation on XPath objects content: arg1 == arg2
ctxt : | |
Returns : |
int xmlXPathCompareValues (xmlXPathParserContextPtr ctxt, int inf, int strict);
Implement the compare operation on XPath objects: arg1 < arg2 (1, 1, ... arg1 <= arg2 (1, 0, ... arg1 > arg2 (0, 1, ... arg1 >= arg2 (0, 0, ...
When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number.
ctxt : | |
inf : | |
strict : | |
Returns : |
void xmlXPathValueFlipSign (xmlXPathParserContextPtr ctxt);
Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
void xmlXPathAddValues (xmlXPathParserContextPtr ctxt);
Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
void xmlXPathSubValues (xmlXPathParserContextPtr ctxt);
Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
void xmlXPathMultValues (xmlXPathParserContextPtr ctxt);
Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
void xmlXPathDivValues (xmlXPathParserContextPtr ctxt);
Implement the div operation on XPath objects arg1 / arg2: The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
void xmlXPathModValues (xmlXPathParserContextPtr ctxt);
Implement the mod operation on XPath objects: arg1 / arg2 The numeric operators convert their operands to numbers as if by calling the number function.
ctxt : |
int xmlXPathIsNodeType (const xmlChar *name);
Is the name given a NodeType one.
[38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'
name : | |
Returns : |
xmlNodePtr xmlXPathNextSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "self" direction The self axis contains just the context node itself
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextChild (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "child" direction The child axis contains the children of the context node in document order.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextDescendant (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextDescendantOrSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextParent (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextAncestorOrSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextFollowingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextFollowing (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes; the nodes are ordered in document order
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextNamespace (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element
We keep the XML namespace node at the end of the list.
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextAttribute (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "attribute" direction TODO: support DTD inherited default attributes
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextPreceding (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes; the nodes are ordered in reverse document order
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextAncestor (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis
ctxt : | |
cur : | |
Returns : |
xmlNodePtr xmlXPathNextPrecedingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.
ctxt : | |
cur : | |
Returns : |
void xmlXPathLastFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathPositionFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathCountFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathIdFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathLocalNameFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the local-
ctxt : | |
nargs : |
void xmlXPathNamespaceURIFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the namespace-
ctxt : | |
nargs : |
void xmlXPathStringFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
If the argument is omitted, it defaults to a node-set with the context node as its only member.
ctxt : | |
nargs : |
void xmlXPathStringLengthFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the string-
ctxt : | |
nargs : |
void xmlXPathConcatFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathContainsFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathStartsWithFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the starts-
ctxt : | |
nargs : |
void xmlXPathSubstringFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathSubstringBeforeFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the substring-
ctxt : | |
nargs : |
void xmlXPathSubstringAfterFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the substring-
ctxt : | |
nargs : |
void xmlXPathNormalizeFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the normalize-
ctxt : | |
nargs : |
void xmlXPathTranslateFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathNotFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathTrueFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathFalseFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathLangFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathNumberFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathSumFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathFloorFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathCeilingFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathRoundFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathBooleanFunction (xmlXPathParserContextPtr ctxt, int nargs);
Implement the
ctxt : | |
nargs : |
void xmlXPathNodeSetFreeNs (xmlNsPtr ns);
Namespace node in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node need to be freed
ns : |
<< xpath | xpointer >> |