Closed sbb520 closed 6 years ago
This is because Text()
returns the TextNode
inside div
, which consists only of the data "hello". The rest is a type of an ElementNode
(p
) which has its own TextNode
inside with the data "hello". You'll need to extract the ElementNode
first and then call Text()
on it.
is there any way to get nested text, just like in beautiful soap??
I want to get a element that contain other element. Such like this: html:
go:
In this sample, it just output "hello". I want it to output "hello\<p>hello\</p>". How can I do that? Thanks for having a look.