Back to index

python3.2  3.2.2
Public Member Functions
xml.etree.ElementTree._SimpleElementPath Class Reference

List of all members.

Public Member Functions

def find
def findtext
def iterfind
def findall

Detailed Description

Definition at line 104 of file ElementTree.py.


Member Function Documentation

def xml.etree.ElementTree._SimpleElementPath.find (   self,
  element,
  tag,
  namespaces = None 
)

Definition at line 106 of file ElementTree.py.

00106 
00107     def find(self, element, tag, namespaces=None):
00108         for elem in element:
00109             if elem.tag == tag:
00110                 return elem
        return None

Here is the caller graph for this function:

def xml.etree.ElementTree._SimpleElementPath.findall (   self,
  element,
  tag,
  namespaces = None 
)

Definition at line 123 of file ElementTree.py.

00123 
00124     def findall(self, element, tag, namespaces=None):
00125         return list(self.iterfind(element, tag, namespaces))
00126 
try:

Here is the call graph for this function:

def xml.etree.ElementTree._SimpleElementPath.findtext (   self,
  element,
  tag,
  default = None,
  namespaces = None 
)

Definition at line 111 of file ElementTree.py.

00111 
00112     def findtext(self, element, tag, default=None, namespaces=None):
00113         elem = self.find(element, tag)
00114         if elem is None:
00115             return default
        return elem.text or ""

Here is the call graph for this function:

def xml.etree.ElementTree._SimpleElementPath.iterfind (   self,
  element,
  tag,
  namespaces = None 
)

Definition at line 116 of file ElementTree.py.

00116 
00117     def iterfind(self, element, tag, namespaces=None):
00118         if tag[:3] == ".//":
00119             for elem in element.iter(tag[3:]):
00120                 yield elem
00121         for elem in element:
00122             if elem.tag == tag:
                yield elem

Here is the caller graph for this function:


The documentation for this class was generated from the following file: