[jdom-interest] setIgnoringElementContentWhitespace inoperant ?

Phill_Perryman at Mitel.COM Phill_Perryman at Mitel.COM
Thu Dec 9 14:20:55 PST 2004


I would be interested in something that removes text that is "only
whitespace" between Elements.

We generate files (outside of JDOM) like

<price part="xxx" />
<price part="xxx" />


etc, say a 1000 of them in the file

and in JDOM I get

Content:
Element
Text
Element
Text

where all the text items are just the carriage returns caused by having the
xml it in a readable format, and some applications dont seem to be able to
supress the returns anyway (Lotus Notes printing to a stream for instance
ignores the ";" which is supposed to supress the carriage return at the end
of a line)

My hope is that if a text item ONLY consists of whitespace it would not be
reported at all. I don't want to waste memory footprint storing thousands
of text items which I am never going to use.

If there is anything other than all whitespace it should be reported "as
is".

maybe ignoreEmptyTextAtEndOfLine might be more applicable.


/Phill
IS Dept, Software Engineer.
phill_perryman at mitel.com
http://www.mitel.com
Tel: +44 1291 436023




More information about the jdom-interest mailing list