[whatwg] DOMParser / XMLSerializer

Boris Zbarsky bzbarsky at MIT.EDU
Thu May 21 11:07:40 PDT 2009


Anne van Kesteren wrote:
>> 2)  DOMParser can parse from a byte array instead of a string; this
>>      makes it a little easier to work with XML in encodings other than
>>      UTF-8 or UTF-16.
> 
> ECMASCript doesn't have byte arrays though. (Though it would be nice if it did.)

Sure, but it has arrays that you can put integers in the 0-255 range into.

>> 2)  XMLSerializer can serialize a subtree rooted at a given node without
>>      removing the node from its current location in the DOM.
> 
> Isn't this true for innerHTML too?

No, you'd need outerHTML for that.  At least if you want to get the same 
behavior as XMLSerializer has.

-Boris




More information about the whatwg mailing list