Package ndg :: Package xacml :: Package utils :: Module xpath_selector :: Class EtreeXPathSelector
[hide private]

Class EtreeXPathSelector

source code

            object --+    
                     |    
XPathSelectorInterface --+
                         |
                        EtreeXPathSelector

XPathSelectorInterface using ElementTree XPath selection.

Nested Classes [hide private]

Inherited from XPathSelectorInterface: __metaclass__

Instance Methods [hide private]
 
__init__(self, contextElem)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
list of basestring
selectText(self, path)
Performs an XPath search and returns text content of matched elements.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, contextElem)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • contextElem (ElementTree.Element) - context element on which searches are based
Overrides: object.__init__

selectText(self, path)

source code 

Performs an XPath search and returns text content of matched elements.

Parameters:
  • path (str) - XPath path expression
Returns: list of basestring
text from selected elements
Overrides: XPathSelectorInterface.selectText