Ignore:
Timestamp:
20/10/06 09:44:19 (13 years ago)
Author:
lawrence
Message:

Modifications to discovery (and browse) to support ndgDoc as an interim
measure ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/ETxmlView.py

    r1577 r1615  
    3333    def getText(self,elem,xpathExpression,multiple=0): 
    3434        ''' Get a text object sensibly ''' 
     35        if elem is None:  
     36            if multiple: 
     37                return ['',] 
     38            else: return ''  
    3539        if multiple: 
    3640                r=elem.findall(self.xmlns+xpathExpression) 
     
    5256    def find(self,elem,xpathExpression): 
    5357       ''' Return relevant subelement ''' 
     58       if elem is None: return '' 
    5459       xe=self.xmlns+xpathExpression 
    5560       return elem.find(xe) 
     
    5762    def findall(self,elem,xpathExpression): 
    5863       ''' Return all relevant subelements ''' 
     64       if elem is None: return [] 
    5965       xe=self.xmlns+xpathExpression 
    6066       return elem.findall(xe) 
Note: See TracChangeset for help on using the changeset viewer.