File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply 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: 8210
    
  71

Please KeepItDown.

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Setting a date in Java class and I want to convert it into XML Gregorian format
 
Similar Threads
how to set 2011-11-06T14:34:16.679+02:00 into XMLGregorianCalendar
Simple Date/Time format question
Processing & Altering Date XMLGregorianCalendar
how to get user defined timezone using XMLGregorianCalendar.
How can dateTime field format can be controlled ?