on ‎2007 Mar 10 4:31 PM
Hi Experts,
My requirement is, I have to parse a XML file and convert it into HTML file.
I'm using SAXParser to parse the XML document.
For example my xml file has the foll tags:
<fruit>
<name>Apple</name>
<title>Eatables</title>
<description>"An Apple a Day keeps the doctor away"</description>
<expDate> 01 Mar 2007</expDate>
</fruit>
it should be displayed in HTML in a table format.
name title descritption expdate
xxx xxx xxxx xxxx
Thanks in Advance,
Suba
Request clarification before answering.
Hi Suba,
1. XSLT is used to generated formatted HTML output from XML.
Check this tutorial:
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/xslt/4_transform.html
2. If you have XML docs in KM and want to show these docs as HTML when the user views them, then you have to create a Repository Content Filter (XSLT Filter) which uses a JAXP Pipeline Formatter to convert XML to HTML.
http://help.sap.com/saphelp_nw2004s/helpdata/en/55/921d7bb0c611d5993800508b6b8b11/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/55/921d87b0c611d5993800508b6b8b11/frameset.htm
There exists already a JAXP Pipeline Formatter in KM:
http://help.sap.com/saphelp_nw2004s/helpdata/en/55/921d78b0c611d5993800508b6b8b11/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/71/50e13d8ee48f5ee10000000a114084/frameset.htm
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.