I'm not sure I get you. Looping through items is done with
Code:
<xsl:for-each select="XPath expression or function">
</xsl:for-each>
And I bet you know it (isn't that one of the first things in XSLT tutorials?), but what exactly you need to match? All elements and attributes? Then the XPath expression would be something like
------
<xsl:for-each select="problem"><xsl:value-of select="solution"></xsl:for-each>