This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Trim space in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Trim space in XML" Watch "Trim space in XML" New topic
Author

Trim space in XML

Suresh Kanagalingam
Ranch Hand

Joined: Aug 17, 2001
Posts: 82
Hi,
I am doing a transformation of XML to CSV format using XSL (Using Xalan). Can anyone tell me how I can trim leading and trailing space in XML tokens when I write the data to CSV file?
Thanks
Suresh
Tina Desai
Ranch Hand

Joined: Mar 13, 2003
Posts: 365
Have u tried this -
normalize-space($ListToBeSent)?
Tina


Alongwith being a good coder, try to be a good professional as well!
Suresh Kanagalingam
Ranch Hand

Joined: Aug 17, 2001
Posts: 82
Thanks Tina. It works.
Suresh
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Trim space in XML
 
Similar Threads
CSV to XML coding in Java
How to read CSV?
How an XML document is written into CSV format in Java/JSP
Doubt about StringTokenizer !!
removing the trailing space of a string only