Hi Manisha, have a look at "http://sourceforge.net/projects/documentserver/" and browse the CVS Repository for documentserver/Document-Server/src/de/lehmanns/documentServer/xmlFormatter and have a look at 1) SimpleSqlToXml.java which converts a ResultSet to XML in the Form <row> <entity></entity> <entity></entity> ... </row> <row> ... (fast and simple)
2) Sql2XmlFormatter.java which converts a ResultSet with the help of an structure file to the form <group1> <group2> <entity></entity> ... <group3> <entity></entity> ... </group3> </group2> ... </group1> (Slow but more 'sophisticated') Holger Am Dienstag, 15. Februar 2005 02:36 schrieb Manisha Sathe: > Initially i tested creating pdf using static xml/xsl file using following > dos prompt cmd - > > fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdf > > Now i want to generate xml/pdf on fly. User will specify search criteria - > depending on that i will pick up data from database.I want to generate xml > from this data and use it to create pdf file. > > What is normal practice to do this? > > 1)I am not too sure about how to create XML - whether use SAX/DOM or just > type it out as a string data 2)e.g If i generate XML o/p as a string - > whether can i make use of this XML String to generate pdf ? Or i need to > write this in a file ? > > Pls guide me, if anybody can share sample which shows creation of XML and > generate pdf from that - would be a greate help. > > regards > Manisha > > > > > > --------------------------------- > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile phone.
pgpmMP91SMKcj.pgp
Description: PGP signature