displaying xml data

Having trouble installing Oxygen? Got a bug to report? Post it all here.
xenie
Posts: 1
Joined: Tue Apr 13, 2004 11:45 am

displaying xml data

Post by xenie »

hi everyone!

can anybody help me?

im a newbie in xml, currently im doing a script that will display the xml data.

in xml file here is the sample code:

<RECORD TABLE="Data" SET="1" CODE="01" TRANSACTION="002" NUM="2">
<DETAIL CODE="00" NUM="00">
<PLAINTEXT NAME="CR_NAME" TYPE="01">VAN112</PLAINTEXT>
<PLAINTEXT NAME="CR_DESC" TYPE="01">Neo URVAN</PLAINTEXT>

and so on....

my problem now is i dunno what would be the script am i going to put in an html to view the data. when i tried to use the ff: code it didnt work

<td><span datafld="CR_NAME"></span></td>
<td><span datafld="CR_DESC"></span></td>

please help.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

You can try to write a XSL stylesheet to convert your XML document to HTML. Go to http://www.zvon.org/xxl/XSLTutorial/Output/index.html for a XSL tutorial. Alternatively you can write your document as a Docbook XML document and use the existing Docbook XSL stylesheets to convert it to any of many other formats: HTML, XHTML, PDF, etc. See the description of the table element in Docbook http://www.docbook.org/tdg/en/html/table.html and the capabilities of the Docbook XSL stylesheets for this and other elements http://www.sagehill.net/docbookxsl/Tables.html.

Hope that heps,
Sorin
Post Reply