XSLT - How can I find out the name of an Element

L

Lenny

Hello,

I want to iterate over the child elements of a certain element and read
out their names (which I don't know).
Is this possible?
I know that it's possible to read out the text content of an element
even if one does not know its name by using wild cards.

Example:

XML document:
<parentElement>
<unknownElementName>text content</unknownElementName>
<parentElement>

stylesheet:
<xsl:template match="/parentElement">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="/parentElement/*">
<xsl:variable name="var1" select="."/>
</xsl:template>

But I need the name ("unknownElementName") !!!

Best Regards,

Lenny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,249
Members
46,845
Latest member
GygaKnight

Latest Threads

Top