Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

How can I parse a html string into a document ?

已查看 42 次
跳至第一个未读帖子

Chen Zhiyuan

未读,
2006年11月13日 07:43:082006/11/13
收件人
It seems that the DOMParser does not support parse a html string into
HTMLDocument? Is there a way to create the Document with a given
string?

Thank you !

mark bokil

未读,
2006年11月13日 08:49:052006/11/13
收件人 dev-ext...@lists.mozilla.org
> _______________________________________________
> dev-extensions mailing list
> dev-ext...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-extensions
>
>
>

var mytext = "<html><body><p>Hello</p></body></html>"
document.write(mytext);

Nickolay Ponomarev

未读,
2006年11月13日 09:24:422006/11/13
收件人 Chen Zhiyuan、dev-ext...@lists.mozilla.org

Chen Zhiyuan

未读,
2006年11月13日 11:03:282006/11/13
收件人
I will try. thanks. But I am not sure if this is the most efficient way
to do it on Firefox.

On 11月13日, 下午4时24分, "Nickolay Ponomarev"
<asquee...@gmail.com> wrote:


> On 13 Nov 2006 04:43:08 -0800, Chen Zhiyuan <gsm.chenzhiy...@gmail.com> wrote:
>
> > It seems that the DOMParser does not support parse a html string into
> > HTMLDocument? Is there a way to create the Document with a given

> > string?http://groups-beta.google.com/group/netscape.public.mozilla.dom/brows...http://groups-beta.google.com/group/netscape.public.mozilla.dom/brows...


>
> You can use the hidden iframe trick to parse the HTML.
>
> Nickolay
>
>
>
> > Thank you !
>
> > _______________________________________________
> > dev-extensions mailing list

> > dev-extensi...@lists.mozilla.org
> >https://lists.mozilla.org/listinfo/dev-extensions

Myk Melez

未读,
2006年11月13日 16:18:362006/11/13
收件人

The microsummary service does this with a hidden iframe. Based on
discussions with the layout guys, this seems to be the best way of doing
it currently.

http://lxr.mozilla.org/mozilla/source/browser/components/microsummaries/src/nsMicrosummaryService.js.in#1862

-myk

Mike Shaver

未读,
2006年11月13日 16:38:132006/11/13
收件人 Nickolay Ponomarev、dev-ext...@lists.mozilla.org、Chen Zhiyuan
0 个新帖子