0

I need Solution for below Task

XML

    <core:ReferenceCoded Description="SERTA BUSINESS CARDS"></core:ReferenceCoded>
    <core:ReferenceCoded Description="XM:107008"></core:ReferenceCoded>
    <core:ReferenceCoded Description="J ALMANZA"></core:ReferenceCoded>
    <core:ReferenceCoded Description="847 857 0049"></core:ReferenceCoded>

XSL

<xsl:template match="abc:BaseItemReference/core:ListOfItemReferences/core:ReferenceCoded"> 

                <xsl:element name="TAG_LINE">                      
                            <xsl:value-of  select="@Description" />                 
                </xsl:element> 

      </xsl:template>

The output XML File is

< TAG_LINE>SERTA BUSINESS CARDS</TAG_LINE>
  < TAG_LINE>XM:107008</TAG_LINE>
  < TAG_LINE>J ALMANZA</TAG_LINE>
  < TAG_LINE>847 857 0049</TAG_LINE>

I need output of third Line. Please Suggest on changing the XSL file Code to fetch data in the Format

<TAG_LINE>J ALMANZA</TAG_LINE>
Phanindra
  • 3
  • 3

1 Answers1

0

This will get the output you want:

<xsl:template match="abc:BaseItemReference/core:ListOfItemReferences/core:ReferenceCoded[3]">
    <xsl:element name="TAG_LINE">
        <xsl:value-of select="@Description"/>
    </xsl:element>
</xsl:template>
Matt Hogan-Jones
  • 2,981
  • 1
  • 29
  • 35