1
votes

I have a xml like prd.xml

  <product>
<text>Some Text</text>
    <name>Pname</name>
    <category extra="category"> Test</category>
    </product>

I want to get the category from the xml using xslt.

I tried like

<xsl:variable name="p" select="prd.xml"/>

<xsl:value-of select ="$p/product/category"/>

but I can't get the result.Anybody help any solution?

1

1 Answers

1
votes
 select="prd.xml"

selects an element prd.xml which isn't there, you want

select="document('prd.xml')"