XSLT <xsl:value-of>
Element
Definition and Usage
The <xsl:value-of>
element extracts the value of a selected node.
The <xsl:value-of>
element can be used to select the value of an XML element and output it.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
select | expression | Required. An XPath expression that specifies from which node/attribute to extract the value. It works similarly to navigating a file system by selecting subdirectories with a forward slash (/). |
disable-output-escaping | yes <br>no | Optional. If set to "yes", the text node generated by instantiating the <xsl:text> element will not be escaped in the output. For example, "<" will be output as "<". If set to "no", "<" will be output as "<". The default is "no". |
Examples
The following example retrieves the values of the first title and artist elements and places them in a table:
Example 1
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: