This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XMLTag Names becoming titles in html
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl]XMLTag Names becoming titles in html
- From: "Sreeram" <hsreeram at indigoarchitects dot com>
- Date: Tue, 17 Apr 2001 18:55:40 +0530
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
Think of an XML in this format.
<root>
<description> Hello </description>
<author> J.Bloggs</author>
<temperature> 37 degrees</temperature>
<soil></soil>
</root>
I haven't been in touch wiht XML for past 3 months. So if there is any
syntactical error pls excuse.
Now one can loop through the elements by going through
"documentElement.childNodes.item(i)" where 'i' is the loop iterator.
Where ever the "documentElement.childNodes.item(i).nodeTypedValue" has got
some value retrieve the "documentElement.childNodes.item(i).nodeName"
Sreeram.
-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Tanzila
Mohammad
Sent: Tuesday, April 17, 2001 6:19 PM
To: XSL-List@lists.mulberrytech.com
Subject: [xsl]XMLTag Names becoming titles in html
I am having the following xml:
<description> Hello </description>
<author> J.Bloggs</author>
<temperature> 37 degrees</temperature>
<soil></soil>
In my xsl:
I need some way of looping through the xml so that if there is content (e.g
Hello for description tag) to display the xml element tag's name (e.g
description) as a title in the html along with the content, otherwise
display nothing (as for the soil tag).
Thanks
Tanz
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list