cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Parsing XML into HTML

Former Member
0 Likes
429

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

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