aspose file tools
The moose likes XML and Related Technologies and the fly likes XALAN as the parser Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "XALAN as the parser" Watch "XALAN as the parser" New topic
Author

XALAN as the parser

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
Hi!

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
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.

See the Java Developer's Almanac for some example code snippets.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: XALAN as the parser
 
Similar Threads
crimson error encountered
display xml as html
javacc - communicating from lexer to parser
display xml as html
Convert String to Date