xml - how to use "current() [name()='merge:change']" type of statement in XSL -


hi, xml working on, need access specific data please desired output is: hello_world

<catalog      xmlns:merge="http://www.merge.org/change" >     <cd>         <title>             <a>empire burlesque</a>             <b>manik</b>         </title>         <artist>                    <a>bob dylan</a>             <b>aayush</b>         </artist>         <country>                    <note>                 <para>a small quantity of hydraulic fluid on inner cylinder satisfactory                      <merge:change>hello_world                     </merge:change>                 </para>             </note>         </country>         <company>columbia</company>         <price>10.90</price>         <year>1985</year>     </cd>     <cd>         <title>hide heart</title>         <artist>bonnie tyler</artist>         <country>uk</country>         <company>cbs records</company>         <price>9.90</price>         <year>1988</year>     </cd> </catalog> 

now want access content written in merge:change tag using functions current() [name()='merge:change']"

i have written xsl: not getting output

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"     xmlns:merge="http://www.merge.org/change">      <xsl:template match="catalog">         <xsl:for-each select="cd/country">             <xsl:value-of select="current()/note/para [name()='merge:change']"/>             <br/>         </xsl:for-each>      </xsl:template> </xsl:stylesheet> 

can please ??

desired output :

hello_world 

change

<xsl:value-of select="current()/note/para [name()='merge:change']"/> 

to

<xsl:value-of select="current()/note/para/*[name()='merge:change']"/> 

the expression para/*[name()='merge:change'] means child of para named merge:change


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -