You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/06/16 20:40:38 UTC

cvs commit: gump/python/gump/utils domutils.py

ajack       2004/06/16 11:40:38

  Modified:    python/gump/utils Tag: CleanUp domutils.py
  Log:
  Cope with empty DOM text.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +2 -1      gump/python/gump/utils/Attic/domutils.py
  
  Index: domutils.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/Attic/domutils.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- domutils.py	11 Jun 2004 17:09:49 -0000	1.1.2.2
  +++ domutils.py	16 Jun 2004 18:40:38 -0000	1.1.2.3
  @@ -169,7 +169,8 @@
       for childNode in element.childNodes:    
           if childNode.nodeType == xml.dom.Node.ELEMENT_NODE:
               if childNode.tagName == name:
  -                value+=getDomTextValue(childNode)
  +                text=getDomTextValue(childNode)
  +                if text: value+=text
       if value: 
           value=value.strip()
       return value or default
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org