How do I get the full XML or HTML content of an element using ElementTree?

后端 未结 7 1093
长情又很酷
长情又很酷 2020-12-30 08:18

That is, all text and subtags, without the tag of an element itself?

Having

blah bleh blih

I

7条回答
  •  醉梦人生
    2020-12-30 09:08

    No idea if an external library might be an option, but anyway -- assuming there is one

    with this text on the page, a jQuery-solution would be:

    alert($('p').html()); // returns blah bleh blih
    

提交回复
热议问题