Read up on SAX parsers, in the JAXP documentation, which is part of
the JEE documentation.

In this case the XML file is only virtual. It is constructed by your
code in the form of SAX parser events. This is a fairly basic manner
to do things. I do not know the other suggestions such as Velocity
templates, but maybe they are easier to use.

Simon

On Thu, Feb 11, 2010 at 01:30:29AM -0800, RithanyaLaxmi wrote:
> 
> Thanks Simon, as per your comment i need to parse the Temp.xml (which
> contains the placeholder) using SAX and read the data from the resultset.
> But how can I merge or append the data reed from DB to the Temp.xml.
> Once i merge the data in place of the placeholder, the temp.xml should look
> like:-
> 
> 
> <bodyContent>
> blahhhhhhhhh... // fetched from db
> </bodycontent>
> 
> I am pretty new to this, please provide the sampled code for this. If there
> is any links related to this those are welcome as well.
> 
> Thanks,
> Rithu
> 
> Simon Pepping @ Home wrote:
> > 
> > You can use SAX. Your app implements SAXParser and emits SAX events:
> > 
> > contentHandler.startElement('header');
> > contentHandler.text('Sample Header');
> > 
> > etc. Similarly for your data from the DB. For example, read the
> > ResultSet, and emit the appropriate SAX events. The total picture is
> > then:
> > 
> > data (SAXParser) -> Transformer (temp.xsl) -> SAXResult (FOP)
> > 
> > Simon
> > 

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to