Finding a node (or close to it) using XPath in non well-formed HTML

前端 未结 2 865
囚心锁ツ
囚心锁ツ 2020-12-06 14:22

I\'m using XPath to locate a node (or something close to it) in a template that has non-well-formed HTML about 10 levels deep. (No I didn\'t write this HTML...but I\'ve bee

2条回答
  •  佛祖请我去吃肉
    2020-12-06 15:01

    XPath does not work directly with HTML. The interaction of XPath with your HTML is dictacted by whatever software/library is parsing the HTML into a rendering tree. This may help direct your search appropriately.

提交回复
热议问题