--- embedaddon/libxml2/doc/html/libxml-xpath.html 2012/02/21 23:37:59 1.1 +++ embedaddon/libxml2/doc/html/libxml-xpath.html 2014/06/15 19:53:36 1.1.1.3 @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underli Module xpath from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xpath from libxml2

API Menu
API Indexes
Related links

API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

Table of Contents

#define XML_XPATH_CHECKNS
#define XML_XPATH_NOVAR
#define xmlXPathNodeSetGetLength
#define xmlXPathNodeSetIsEmpty
#define xmlXPathNodeSetItem
Structure xmlNodeSet
struct _xmlNodeSet + Module xpath from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xpath from libxml2

API Menu
API Indexes
Related links

API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

Table of Contents

#define XML_XPATH_CHECKNS
#define XML_XPATH_NOVAR
#define xmlXPathNodeSetGetLength
#define xmlXPathNodeSetIsEmpty
#define xmlXPathNodeSetItem
Structure xmlNodeSet
struct _xmlNodeSet
Typedef xmlNodeSet * xmlNodeSetPtr
 
Structure xmlXPathAxis
struct _xmlXPathAxis
Typedef xmlXPathAxis * xmlXPathAxisPtr
@@ -81,9 +81,11 @@ void	xmlXPathFunction	
 
int	xmlXPathIsInf			(double val)
int	xmlXPathIsNaN			(double val)
xmlXPathContextPtr	xmlXPathNewContext	(xmlDocPtr doc)
+
xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)
xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)
xmlXPathObjectPtr	xmlXPathObjectCopy	(xmlXPathObjectPtr val)
long	xmlXPathOrderDocElems		(xmlDocPtr doc)
+
int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)
Function type: xmlXPathVariableLookupFunc
 xmlXPathObjectPtr	xmlXPathVariableLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)
@@ -166,6 +168,8 @@ The content of this structure is not made public by th XPATH_ENCODING_ERROR = 20 XPATH_INVALID_CHAR_ERROR = 21 XPATH_INVALID_CTXT = 22 + XPATH_STACK_ERROR = 23 + XPATH_FORBID_VARIABLE_ERROR = 24 }

Structure xmlXPathFunct

Structure xmlXPathFunct
struct _xmlXPathFunct { const xmlChar * name : the function name @@ -204,6 +208,7 @@ The content of this structure is not made public by th xmlXPathCompExprPtr comp : the precompiled expression int xptr : it this an XPointer expression xmlNodePtr ancestor : used for walking preceding axis + int valueFrame : used to limit Pop on the stack }

Structure xmlXPathType

Structure xmlXPathType
struct _xmlXPathType { const xmlChar * name : the type name xmlXPathConvertFunc func : the conversion function @@ -295,13 +300,17 @@ void xmlXPathFunction (
val:a double value
Returns:1 if the value is a NaN, 0 otherwise

Function: xmlXPathNewContext

xmlXPathContextPtr	xmlXPathNewContext	(xmlDocPtr doc)

Create a new xmlXPathContext

-
doc:the XML document
Returns:the xmlXPathContext just allocated. The caller will need to free it.

Function: xmlXPathNodeSetCreate

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)
+
doc:the XML document
Returns:the xmlXPathContext just allocated. The caller will need to free it.

Function: xmlXPathNodeEval

xmlXPathObjectPtr	xmlXPathNodeEval	(xmlNodePtr node, 
const xmlChar * str,
xmlXPathContextPtr ctx)
+

Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.

+
node:the node to to use as the context node
str:the XPath expression
ctx:the XPath context
Returns:the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

Function: xmlXPathNodeSetCreate

xmlNodeSetPtr	xmlXPathNodeSetCreate	(xmlNodePtr val)

Create a new xmlNodeSetPtr of type double and of value @val

val:an initial xmlNodePtr, or NULL
Returns:the newly created object.

Function: xmlXPathObjectCopy

xmlXPathObjectPtr	xmlXPathObjectCopy	(xmlXPathObjectPtr val)

allocate a new copy of a given object

val:the original object
Returns:the newly created object.

Function: xmlXPathOrderDocElems

long	xmlXPathOrderDocElems		(xmlDocPtr doc)

Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.

-
doc:an input document
Returns:the number of elements found in the document or -1 in case of error.

Function type: xmlXPathVariableLookupFunc

Function type: xmlXPathVariableLookupFunc
+
doc:an input document
Returns:the number of elements found in the document or -1 in case of error.

Function: xmlXPathSetContextNode

int	xmlXPathSetContextNode		(xmlNodePtr node, 
xmlXPathContextPtr ctx)
+

Sets 'node' as the context node. The node must be in the same document as that associated with the context.

+
node:the node to to use as the context node
ctx:the XPath context
Returns:-1 in case of error or 0 if successful

Function type: xmlXPathVariableLookupFunc

Function type: xmlXPathVariableLookupFunc
 xmlXPathObjectPtr	xmlXPathVariableLookupFunc	(void * ctxt, 
const xmlChar * name,
const xmlChar * ns_uri)

Prototype for callbacks used to plug variable lookup in the XPath engine.

ctxt:an XPath context
name:name of the variable
ns_uri:the namespace name hosting this variable
Returns:the XPath object value or NULL if not found.

Daniel Veillard