[jdom-interest] getTextTrim() question
Matthew MacKenzie
matt at xmlglobal.com
Fri Apr 20 15:20:12 PDT 2001
The easiest way to get this behaviour would be simply getText().trim()
-Matt
----- Original Message -----
From: "Mark J Laird" <Markl at waterford.org>
To: <jdom-interest at jdom.org>
Sent: Friday, April 20, 2001 1:05 PM
Subject: [jdom-interest] getTextTrim() question
> Hi all,
>
> I have a question about getTextTrim() in org.jdom.Element. According to
the documentation, it
> will remove all external whitespace, and normalize all internal whitespace
to one space. Is
> there any way to have it do external trimming only and leave internal
content unchanged? In
> other words, if I have the following text:
> " This has spaces. "
> Is there any way to get it to return:
> "This has spaces."
> Rather than
> "This has spaces."
>
> I am using XMLOutputter's "setTextTrim" method which invokes
Element.getTextTrim(), and I would
> like to be able to do external trimming only, if possible.
>
> Thanks,
>
> Mark
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
More information about the jdom-interest
mailing list