What's the way to get a tag name and attribute name in XML?
If I have a XML file like this:
<a>
<apple color="red"/>
<banana color="yellow"/>
<sugar taste="sweet"/>
<cat size="small"/>
</a>
And part of my XSLT file is as below:
<xsl:element name="AAA">
<???>
</xsl:element>
So what should I write in the ??? part so I can get the output like this:
For tag name:
<AAA>apple</AAA>
<AAA>banana</AAA>
<AAA>sugar</AAA>
<AAA>cat</AAA>
For attribute name:
<AAA>color</AAA>
<AAA>color</AAA>
<AAA>taste</AAA>
<AAA>size</AAA>