I am wondering if there is a way to transfer over a parent element with all of its children elements that have the same element name using XSLT.
For example, if the original xml file is like this:
<parent>
<child>1</child>
<child>2</child>
<child>3</child>
</parent>
And I try to parse it with xsl using:
<xsl:for-each select="parent">
<print><xsl:value-of select="child"></print>
wanting something like this:
<print>1</print>
<print>2</print>
<print>3</print>
but I get this:
<print>1</print>
because the for-each is more designed for this format:
<parent>
<child>1</child>
<parent>
</parent
<child>2</child>
<parent>
</parent
<child>3</child>
</parent
Is there anyway to get the desired printout without formatting it like it is above, but rather the first way?
Thanks