Adding Whitespace

R

Ravi

my xml looks like:

<abc>
<val1>1</val1>
<val2>2</val2>
<val3>3</val3>
</abc>

and I want to have it displayed as

Col1 Col2 Col3
val1 val2 val3

with the columns separated by a tab. I used the following snippet in my
xsl but I am not getting the desired output. the columns are being
separated only by a single space.

<xsl:template match="abc">
Col1<xsl:text> </xsl:text>Col2<xsl:text> </xsl:text>Col3<br/>
<xsl:value-of select="val1"><xsl:text> </xsl:text><xsl:value-of
select="val2"><xsl:text> </xsl:text><xsl:value-of select="val3"><br/>
</xsl:template>

how can i add a tab after each value is displayed?

TIA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top