Link to home
Start Free TrialLog in
Avatar of bkreddy
bkreddy

asked on

XSL - XML file Retain Comments

Hi Experts,

I am relatively new to XSL.
I am trying to do the transformation from 1 xml to a different format of xml.

<xsl:template match="/">
<parentElement>
                              <subElement>
                                    <xsl:for-each select="(subElement/node())[boolean(self::text())]">
                                          <xsl:value-of select="string(.)"/>
                                    </xsl:for-each>
                              </subElement>

Now my soource xml file also has comments for each subElement. Appreciate any assistance to proceed further in capturing the comments.
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial