Constructing a DOM tree from a HTML fragment
Koos Vriezen
koos.vriezen at xs4all.nl
Mon Oct 28 19:27:59 GMT 2002
On Mon, 28 Oct 2002, Ravikiran Rajagopal wrote:
> Hello,
> I am trying to dynamically generate a HTML document. I have a table cell in
> which I need to display some text. The text is (HTML) marked up; it is out of
> my control and is given to my process. I can't create a text child node and
> display it because the markup is then not used. So, I presume I must create a
> document fragment, parse the given HTML text into a tree and then append the
> (root of the) tree as a child node of the table cell.
> The problem is that I cannot figure out how to parse the given text (HTML
> fragment) with the HTMLParser class. Can someone tell me how to do it?
> If this is a total newbie question answered in a canonical resource
> somewhere, I would be extremely grateful if you could point me to it.
Use innerHTML. Look at html/html_elementimpl.cpp:257 to see the
elements supporting it.
Regards,
Koos
>
> Thanks,
> Ravi
>
>
More information about the kfm-devel
mailing list