[jdom-interest] getTextTrim() question
Mark J Laird
Markl at waterford.org
Fri Apr 20 15:42:31 PDT 2001
That's a good idea, and would work well for an individual Element. I would like
to have XMLOutputter do this for all of my Elements on output. Is there a way
to set the XMLOutputter so that it uses Element.getText().trim() rather than
Element.getTextTrim()?
Mark
> 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