File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Trim space in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Trim space in XML" Watch "Trim space in XML" New topic

Trim space in XML

Suresh Kanagalingam
Ranch Hand

Joined: Aug 17, 2001
Posts: 82
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?
Tina Desai
Ranch Hand

Joined: Mar 13, 2003
Posts: 365
Have u tried this -

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.
I agree. Here's the link:
subject: Trim space in XML
Similar Threads
How to read CSV?
CSV to XML coding in Java
How an XML document is written into CSV format in Java/JSP
removing the trailing space of a string only
Doubt about StringTokenizer !!