Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Serialize selected elements to a Writer.

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT ccil.org>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Serialize selected elements to a Writer.
  • Date: Fri, 13 Oct 2006 12:05:04 -0400

Elliotte Harold scripsit:

> The problem is that a Writer doesn't give you enough information to tell
> which characters need to be escaped and which don't. JDOM floundered on
> this shoal too, though they went the other way; serializing to writers
> but potentially producing malformed output. I'm not sure there's a
> good option here. :-(

If the Writer is an instance of StringWriter or CharArrayWriter, you
can safely use the full Unicode repertoire. Otherwise, assume the ASCII
repertoire (even EBCDIC OutputStreamWriters implement that much).

--
How they ever reached any conclusion at all <cowan AT ccil.org>
is starkly unknowable to the human mind. http://www.ccil.org/~cowan
--"Backstage Lensman", Randall Garrett




Archive powered by MHonArc 2.6.24.

Top of Page