This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The expression: startDateNode.getText().trim() gives you the date in text format, then you parse it into a Date object. By calling format(), you do the opposite again (format the Date back into a String). You could just as well forget about the whole SimpleDateFormat object:
String text = startDateNode.getText().trim(); [ April 27, 2006: Message edited by: Jesper Young ]