Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XML whitespace in text

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT>
  • To: ksclarke AT, xom-interest AT
  • Cc:
  • Subject: Re: [XOM-interest] XML whitespace in text
  • Date: Wed, 28 May 2003 20:32:08 -0400

At 1:39 PM -0700 5/28/03, ksclarke AT wrote:
Sorry, as someone kindly pointed out, I should have been a bit more
clear (often a problem of mine)... I'd like spaces to be maintained in
attributes and hard returns to be maintained in comments even when
pretty printing... or rather, I was wondering whether others would also
find this useful...

No, I don't think that's a common use case. The common cases are:

1. preserve it everywhere it's significant
2. preserve it nowhere

I'm not going to support 2**7 different combinations of preserving and not preserving white space depending on which nodes you do and do not care about.

You might be able to do what you're asking for by subclassing, but perhaps not. In any case, I suspect you should probably just go ahead and preserve white space everywhere.

Elliotte Rusty Harold
elharo AT
Processing XML with Java (Addison-Wesley, 2002)

Archive powered by MHonArc 2.6.24.

Top of Page