过滤 Beautifulsoup4 中定义的 属性 的所有节点
Filter all nodes where the property defined in Beautifulsoup4
在 bs4:
中的某个节点 属性 上过滤很容易
doc_soup.find_all('simpleType', {name: 'k'})
如何找到 属性 定义的所有节点(无论值如何)?
将属性值设置为 True
,这基本上会检查 属性是否存在 :
doc_soup.find_all('simpleType', {name: True})
在 bs4:
中的某个节点 属性 上过滤很容易doc_soup.find_all('simpleType', {name: 'k'})
如何找到 属性 定义的所有节点(无论值如何)?
将属性值设置为 True
,这基本上会检查 属性是否存在 :
doc_soup.find_all('simpleType', {name: True})