XSLT xsl:value-of Element
XSLT Element Reference Manual
Definition and Usage
xsl:value-of The element extracts the value of a selected node.
xsl:value-of The element can be used to select the value of an XML element and output it.
Syntax
property
| property | Value | Description |
|---|---|---|
| select | expression | Required. An XPath expression specifying which node/attribute to extract the value from. It works like navigating a file system by using a forward slash (/) to select subdirectories. |
| disable-output-escaping | yes | |
| no | Optional. If the value is "yes", text nodes generated by instantiating the xsl:text element will not be escaped in any way in the output. For example, "<" will be output as "<". If the value is "no", then "<" will be output as "<". Default is "no". |
Example
The following example gets the values of the first title and artist elements and places them in a table:
Example 1
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">Music Collection:
Title
Artist
Try it »
The following example loops through each cd element and creates a table row with the values of the title and artist of each cd element:
Example 2
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">Music Collection:
Title
Artist
Try it »
XSLT Element Reference Manual