Hi all,
Does anyone know the XPATH syntax to return just the child one level in, but not all the descendents. For this XML:
<Budget>
<Department>Legal<Variance>12</Variance></Department>
<Department>Sales<Variance>16</Variance></Department>
<Department>Accounting<Variance>1</Variance></Department>
</Budget>
I want to getjust the department names, not department AND variance. Here is the XPATH so far...
<xsl:for-each select="//Budget/Department">
<TR>
<TD ALIGN="Center"><xsl:value-of select="."/></TD>
<TD ALIGN="Center"><xsl:value-of select="./Variance"/></TD>
</TR>
</xsl:for-each>
This fills two table columns. The second column (for Variance) correctly returns just the number (i.e. 12). But the first column returns the Department and Variance (i.e. Legal 12)
How can I isolate just the Department name to appear in the first column?
Thanks,
Ken B
Does anyone know the XPATH syntax to return just the child one level in, but not all the descendents. For this XML:
<Budget>
<Department>Legal<Variance>12</Variance></Department>
<Department>Sales<Variance>16</Variance></Department>
<Department>Accounting<Variance>1</Variance></Department>
</Budget>
I want to getjust the department names, not department AND variance. Here is the XPATH so far...
<xsl:for-each select="//Budget/Department">
<TR>
<TD ALIGN="Center"><xsl:value-of select="."/></TD>
<TD ALIGN="Center"><xsl:value-of select="./Variance"/></TD>
</TR>
</xsl:for-each>
This fills two table columns. The second column (for Variance) correctly returns just the number (i.e. 12). But the first column returns the Department and Variance (i.e. Legal 12)
How can I isolate just the Department name to appear in the first column?
Thanks,
Ken B