def _get_child_text(parent, tag, construct=unicode):
 child = parent.find(_ns(tag))
 if ((child is not None) and child.text):
  return construct(child.text)

def _get_child_text ( parent , tag , construct = unicode ) : child = parent . find ( _ns ( tag ) ) if ( ( child is not None ) and child . text ) : return construct ( child . text )
find a child node by tag; pass its text through a constructor .