Re: Unable to round-trip tab character using XMLHttpRequest and XMLSerializer
Jonas Sicking <[email protected]> Mon, 01 Oct 2007 15:37:13 -0700
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Boris Zbarsky wrote: >> This should be expected, but the question remains: How can a character >> entity be written using XMLSerializer? > > It can't. The point of XMLSerializer is to expose a very simple easy to > use serialization model. Trusted callers who need something more > complicated can use nsIDocumentEncoder with all its complexity directly > (though I'm not sure even that will let you entity-encode tabs, > necessarily). Isn't it a bug that we're not creating a character entity in this case though? We're creating entities for characters that would produce invalid XML (<, &, >, etc) while serializing textnodes, so why not create them for whitespace when serializing attributes. / Jonas