Forums Register Login

xml file generation

+Pie Number of slices to send: Send
hi all

i am trying to generate a xml file from jsp dynamically from db as



it will give me like
<roottag>
<leaveinfo>
<xxx>somestring</xxx>
<year>someyear</year>
........
</leaveinfo>
</roottag>
but i want in some other format like

<roottag>
<leaveinfo xxx="somestr" year="someyear" ...>
<leaveinfo xxx="...." year="...." .....>
</roottag>

can some one help me with some example
+Pie Number of slices to send: Send
why don't you try in this manner
while(rs.next()) {
outfile.write("<leaveinfo xxx="+rset.getDate("startdate")+" year="+rset.getString("Year")+.........+"/>");
}
+Pie Number of slices to send: Send
Hi friend , can you tell me what is your problem ?
do you want to generate that xml file for users to download into thier local computers ?
what is your purpose of generating that xml file and what is your problem.

you can generate the xml file inside a Stringbuffer and then write it out using a c:out. better way is to generate the xml file and then write it to the outputstream.
btw , give more details and probably more ranchers will come to your aid .
+Pie Number of slices to send: Send
i got it as naresh direction
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 854 times.
Similar Threads
JSP error: invalid arguments in call . PLEASE HELP
Pass XSL attribute value to javascript function
sax on socket
Parsing an XML
display xml as html
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:29:49.