Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Extra white space escaping to preserve the infoset

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Extra white space escaping to preserve the infoset
  • Date: Tue, 08 Jul 2003 18:41:50 -0500

John Cowan writes:

> It can't be helped; this is what XML parsers do. They convert all line
> endin
> gs to \n so that applications don't have to worry about the differences
> between different line endings.

My problem is I'm learning toward the position that if I serialize a XOM or
JDOM tree to text, I should be able to run it through a XML parser and
XOMHandler/SAXHandler and get the same XOM or JDOM tree where all attribute
values and text nodes will be the same character for character as the
original. It just hits my Okie simplicity as the right thing to do. I'm not
sure if automatically converting the line breaks will do that. By always
escaping all attribute values and text nodes so the re-parse will recreate
the original character, I'm pretty sure it will.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page