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 moose likes XML and Related Technologies and the fly likes Setting a date in Java class and I want to convert it into XML Gregorian format 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 "Setting a date in Java class and I want to convert it into XML Gregorian format" Watch "Setting a date in Java class and I want to convert it into XML Gregorian format" New topic
Author

Setting a date in Java class and I want to convert it into XML Gregorian format

saurabhthard aggarwal
Greenhorn

Joined: Nov 20, 2008
Posts: 22
Hi all


I'm setting a date in java class and i want to convert it into xml georgian format in a single line
.
is there any method available,how do i solve this problem.

I have this code with me


XMLGregorianCalendar xgc = DatatypeFactory.newInstance().newXMLGregorianCalendar();
xgc.setYear(1985);
xgc.setMonth(12);
xgc.setDay(17);

xgcCopy = DatatypeFactory.newInstance().newXMLGregorianCalendar(xgc.toXMLFormat());




please reply
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10441
    
176

Please KeepItDown.

[My Blog] [JavaRanch Journal]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Setting a date in Java class and I want to convert it into XML Gregorian format
 
jQuery in Action, 3rd edition