[xml] Re: 'Re: "Control over encoding declaration (prolog and meta)'

Kasimier Buchcik wrote:
You want to put the serialised data in a DOMString? Having a document as it would be on the permanent storage, verbatim, in a DOMString? Why in the name of God would you ever want to do this? DOM is there to access parsed data, not serialised data, no?

In the name of God, I want to do this because of the lovely DOM 3 LS specification.


DOM 3 LS - LSSerializer.writeToString

Okay, five negative points for me.

According to that spec, someone thought that serialising in a DOMString is a good idea. My opinion hasn't changed, I still think that noone should ever need that, but I won't argue about specs.

So you want to implement the writeToString method.

But why would you specify some ISO-X encoding in the XML declaration of the serialised data? The encoding in the XML declaration of the serialised XML refers to precisely that serialised XML.

As I read that spec, writeToString method can serialise only in UTF-16. If it outputs a XML declaration and specifies an encoding, then it must specify UTF-16 and nothing else.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]