I need to extract some values from the following xml file.
<PAIR symbol="sym1">
<value-date row="0" name="TOM" date="2014-05-15"/>
<value-date row="0" name="SP" date="2014-05-16"/>
<PAIR>
I have to print like this:
sym1 2014-05-15
sym1 2014-05-16
I used the following cmnd in linux to do this:
xsltproc a.xslt xmlfilename
My a.xslt is:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//PAIR">
"<xsl:value-of select="@symbol"/>"
</xsl:template>
<xsl:template match="value-date">
"<xsl:value-of select="@date"/>"
</xsl:template>
</xsl:stylesheet>
But it is extracting the symbol only. Not extracting the date.