W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] DOMParser / XMLSerializer

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 20 May 2009 16:46:24 -0700
Message-ID: <63df84f0905201646u7820d55dvfce7401f8c7ab594@mail.gmail.com>
On Wed, May 20, 2009 at 2:20 PM, Anne van Kesteren <annevk at opera.com> wrote:
> Although it seems most browsers have adopted these APIs, HTML5 offers basically identical APIs in the form of
> ?document.innerHTML
> or is there something that DOMParser / XMLSerializer can do that document.innerHTML cannot?

Mostly I think these APIs came about before innerHTML was supported in
XML content. DOMParser is also somewhat more convenient if you want a
full document back. And XMLSerializer is more convenient if you want
an XML serialization of text/html content.

/ Jonas
Received on Wednesday, 20 May 2009 16:46:24 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC