第一個situation:tag內有link
#from lxml import etree
node = etree.fromstring('<a xml = 'www.www.com'><c>bum</c></a>')
print node.findtext('c',default = 'what happened?')
第二個situation:所求text所在tag上一階tag無content
from lxml import etree
node = etree.fromstring('<a><b><c>bum</c></b></a>')
print node.findtext('c', default = 'what happened?')
以上兩個situation所回傳的結果都是‘None’
成功的situation
#from lxml import etree
node = etree.fromstring('<a><c>bum</c></a>')
print node.findtext('c')
想問這兩個問題該怎麼解決?