XPath Examples
..................................................................................................................................
This topic reviews the syntax examples that appear throughout the XPath Reference. All are based on the Sample XML File
for XPath Syntax (inventory.xml). For an example of using an XPath expression in a test file, see "Example of Unions ( | )",
at the bottom of this topic.
Code Example illustrating the manipulations produced
..................................................................................................................................
More examples from the site article itself
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="root">
<xsl:for-each select="x | y/x">
<xsl:value-of select="."/>,
<xsl:if test="not(position()=last())">,</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thursday, July 10, 2014
[ Microsoft.com ] - XPath Examples
About Equatorlounge
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment