|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am using linux as my platform and mozilla therefore it does not support ActiveXObject("Microsoft.XMLDOM")
I need to load the xml from url like http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=mesh&term=calcium And style it with xsl and map them together in jsp. I need some examples on using java to map xml and xsl to jsp as output display page. Can someone pls help me. Thanks alot. |
|
#2
|
|||
|
|||
|
Hi,
You can use a Java Transformer Object to transform the XML content according to the XSL file.Give a file name with .jsp as the target for the transform method. this will create a new jsp page with the required output. if u want to know how it works in JAVA, the code snippet looks like this: try{ TransformerFactory tFactory=TransformerFactory.newInstance(); Transformer transformer=tFactory.newTransformer(new StreamSource("test.xsl")); transformer.transform(new StreamSource("test.xml"), new StreamResult(new FileOutputStream("new.jsp"))); }catch(TransformerConfigurationException tce){ tce.printStackTrace(); i hope i have answered your question. bye. Subi. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Impt!!! Some qns on mapping xml and xsl to jsp? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|