XML/XSLT

A

Anjali

Hi,

I am new to XML/XSLT. I want to read XML value and put it in the
textbox in XSLT. How do I do that.

Eg:
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
<td><input type="text" name="test"
value=<xsl:value-of select="country"/>/></td>
</tr>

I am able to display title, artist inside <td> but I need to display
country in a textbox so User can edit it.

How do I do this.

Thanks in advance

Sridevi
 
M

Morris M. Keesan

<td><input type="text" name="test"
value=<xsl:value-of select="country"/>/></td>

<td><input type="text" name="test" value="{country}"/></td>

or if that doesn't work, or if you prefer verbosity,

<td>
<input type="text" name="test">
<xsl:attribute name="value">
<xsl:value-of select="country"/>
</xsl:attribute>
</input>
</td>
 
A

Anjali

Thanks Morris, it worked

Thanks
Sridevi

Morris M. Keesan said:
<td><input type="text" name="test" value="{country}"/></td>

or if that doesn't work, or if you prefer verbosity,

<td>
<input type="text" name="test">
<xsl:attribute name="value">
<xsl:value-of select="country"/>
</xsl:attribute>
</input>
</td>
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top