Home » Developer & Programmer » JDeveloper, Java & XML » How to write an XML
How to write an XML [message #181725] Tue, 11 July 2006 05:03 Go to next message
NullPointer
Messages: 2
Registered: July 2006
Location: Pakistan
Junior Member
Hi

for some this question will seem to be a stupid, but i am really confused how can i write an XML file from with in JSP code. should i have to use same FileOutPutStrea.

Actually i am trying to make reports using Jasper api. It demands for an XML file which will then b converted into PDF file. Can any one help me in it.
Re: How to write an XML [message #181739 is a reply to message #181725] Tue, 11 July 2006 06:09 Go to previous messageGo to next message
hobbes
Messages: 173
Registered: January 2006
Senior Member
FileOutputStream is meant for writing streams of raw bytes such as image data. For writing streams of characters (as for an XML file), consider FileWriter.

You can even use JSP to render as XML the way it does as HTML. The page content type should be "text/xml", the static XML content within XML tags and dynamic content (Java code) between the usual scriptlet tags (<%...%>).

Refer for details/examples:
Link 1
Link 2


Re: How to write an XML [message #181741 is a reply to message #181739] Tue, 11 July 2006 06:41 Go to previous message
NullPointer
Messages: 2
Registered: July 2006
Location: Pakistan
Junior Member
hey thanks man ... i'll now study those tutorial and work on those ... thanks a lot ...Smile

do any one of you have idea of generating PDF reports from JSP. Uptill now i have come to the solution of using Jasper. is there any thing else.

I am looking for freeware solution.
Previous Topic: extractvalue returns null
Next Topic: popup login
Goto Forum:
  


Current Time: Mon Nov 25 00:22:44 CST 2024