Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
IMCreator - Free Website Builder

XSLT <value-of> Element

The <xsl:value-of> element allows you to retrieve the value from a node.

When using the <xsl:value-of> element, you use the select attribute to specify which node you want to retrieve data from.

Usage Example

This example is a continuation of the example from the previous lesson. Here, we have added the <xsl:value-of/> element to extract data from the child nodes called "name" and "url".

Code

So, let's have another look at our XML document, and see which values will be selected:

Code

And just to refresh your memory, these values will be displayed where we choose to place the XSLT <xsl:apply-templates> element.

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!