Originally posted by Richard Elsberry:
Hello,
Am having a hard time researching this one. I am currently using a jsp page with imbedded jsp's to display data from a database as html in a browser.
I would like to be able to convert the output to xml as well for additional processing but cannot figure out how to do that conversion on the fly.
My ultimate goal is to apply an xsl-fo style sheet to display the web page in a pdf document as well.
Has anybody come across this situation? I feel that once I can get the generated html page as a DOM it should be easy to use FOP for pdf display. Any thoughts or suggestions would be greatly appreciated.
Regards,
Richard
--------------------------------------------------
To convert the output of JSP page to xml:
1- You have to be sure that the JSP page content is text/xml adding:
<%@ page contentType="text/xml"%>
2- You have to notify the JSP page which the xslt file should be used to process transformation like
<?xml:stylesheet type="text/xsl"
href="file.xsl"
version="1.0"
encoding="UTF-8"?>