I need to create an xml document. I would get the system date and time and depending on the value, would create an xml document. I need to use XALAN as the parser. Any ideas on how this can be done. Eg: if the system date is 30th March, 2005, then my xml file would be
<calendar> <year> 2005 </year> <months> <month> January </month> <month> February </month> <month> March </month> <months> <year> 2004 </year> <months> <month> January </month> <month> February </month> <month> March </month> <month> April </month> .... <months> </calendar>
This xml document should be genearated on the fly.
Any ideas plz help!!!
SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Originally posted by JayaSiji Gopal: I need to create an xml document. I would get the system date and time and depending on the value, would create an xml document. I need to use XALAN as the parser. Any ideas on how this can be done.
Well, Apache Xalan is not a parser but an XSLT implementation. What you want is Apache Xerces. I guess you could generate this file using an XSLT stylesheet as well but I'm thinking it should be a lot easier to use the DOM API to construct the XML document programmatically.