Module libxml2 :: Class xpathContext
[hide private]
[frames] | no frames]

Class xpathContext

source code

Instance Methods [hide private]
 
__init__(self, _obj=None) source code
 
contextDoc(self)
Get the doc from an xpathContext
source code
 
contextNode(self)
Get the current node from an xpathContext
source code
 
contextPosition(self)
Get the current node from an xpathContext
source code
 
contextSize(self)
Get the current node from an xpathContext
source code
 
function(self)
Get the current function name xpathContext
source code
 
functionURI(self)
Get the current function name URI xpathContext
source code
 
setContextDoc(self, doc)
Set the doc of an xpathContext
source code
 
setContextNode(self, node)
Set the current node of an xpathContext
source code
 
registerXPathFunction(self, name, ns_uri, f)
Register a Python written function to the XPath interpreter
source code
 
xpathContextSetCache(self, active, value, options)
Creates/frees an object cache on the XPath context.
source code
 
xpathEval(self, str)
Evaluate the XPath Location Path in the given context.
source code
 
xpathEvalExpression(self, str)
Evaluate the XPath expression in the given context.
source code
 
xpathFreeContext(self)
Free up an xmlXPathContext
source code
 
xpathNewParserContext(self, str)
Create a new xmlXPathParserContext
source code
 
xpathNsLookup(self, prefix)
Search in the namespace declaration array of the context for the given namespace name associated to the given prefix
source code
 
xpathRegisterAllFunctions(self)
Registers all default XPath functions in this context
source code
 
xpathRegisterNs(self, prefix, ns_uri)
Register a new namespace.
source code
 
xpathRegisteredFuncsCleanup(self)
Cleanup the XPath context data associated to registered functions
source code
 
xpathRegisteredNsCleanup(self)
Cleanup the XPath context data associated to registered variables
source code
 
xpathRegisteredVariablesCleanup(self)
Cleanup the XPath context data associated to registered variables
source code
 
xpathVariableLookup(self, name)
Search in the Variable array of the context for the given variable value.
source code
 
xpathVariableLookupNS(self, name, ns_uri)
Search in the Variable array of the context for the given variable value.
source code
 
xpointerEval(self, str)
Evaluate the XPath Location Path in the given context.
source code
Method Details [hide private]

xpathContextSetCache(self, active, value, options)

source code 
Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use <0 for the default number (100). Other values for @options have currently no effect.

xpathRegisterNs(self, prefix, ns_uri)

source code 
Register a new namespace. If @ns_uri is None it unregisters the namespace