GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes Carriage Return and Space problem in JDOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Carriage Return and Space problem in JDOM " Watch "Carriage Return and Space problem in JDOM " New topic
Author

Carriage Return and Space problem in JDOM

lalitha prasad
Greenhorn

Joined: Aug 28, 2004
Posts: 16
Hi,

I have one big Form in JSP with Big <TextArea> element. User is trying to insert more paragraph.

But I need to compare the data between the request parameter value and XML content value for this element.

Please help how to handle carriage return and space problems in JDOM.

Thanks in Advance,
LALITH
Joe Urbanek
Greenhorn

Joined: Jan 31, 2005
Posts: 15
Can you be you be more specific an detail what you are trying to do. If you are trying to filter the textarea text, regular expressions would be the way to go.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Moving to XML forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
In the String class:

replaceAll() - Search for something and replace it
trim() - Trim whitespace
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
I'm with Joe on the use of regex expressions to modify text for XML - but it does get realllllly complicated. The first big question is - are you holding the text in a CDATA section or a plain element content? Second big question - is that text going to contain any characters special to XML - HTML tags, & etc.?
Bill
 
GeeCON Prague 2014
 
subject: Carriage Return and Space problem in JDOM