<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts of Venkatesh Neelam RSS</title><link><![CDATA[https://prospectspace.com/m/posts/rss/author/105]]></link><atom:link href="https://prospectspace.com/m/posts/rss/author/105" rel="self" type="application/rss+xml" /><description>Posts of Venkatesh Neelam RSS</description><lastBuildDate>Fri, 06 Dec 2024 06:35:57 GMT</lastBuildDate><item><title><![CDATA[Loop only particular fields inside Report Entry]]></title><link><![CDATA[https://prospectspace.com/view-post/loop-only-particular-fields-inside-report]]></link><guid><![CDATA[https://prospectspace.com/view-post/loop-only-particular-fields-inside-report]]></guid><description><![CDATA[<p>From below sample XML, I need to loop only certain fields only like CA, CB, CC.. not remain fields..    &lt;wd:Report_Data&gt;  &lt;Report_Entry&gt;    &lt;wd:AA&gt;A&lt;/wd:AA&gt;    &lt;wd:BB&gt;B&lt;/wd:BB&gt;    &lt;wd:CA&gt;C&lt;/wd:CA&gt;    &lt;wd:CB&gt;AB&lt;/wd:CB&gt;    &lt;wd:CC&gt;BC&lt;/wd:CC&gt;    &lt;wd:F&gt;A&lt;/wd:F&gt;    &lt;wd:G&gt;A&lt;/wd:G&gt;    &lt;wd:H&gt;A&lt;/wd:H&gt;  &lt;/Report_Entry&gt;&lt;/wd:Report_Data&gt;  We come across an function called node() and Local-Name()Here is Sample XSLT: Loop fields - name starts with C and separated by comma     &lt;xsl:for-each select="node()[starts-with(name(), 'wd:C')]"&gt;          &lt;xsl:value-of select="concat(local-name(.),':')"/&gt;          &lt;xsl:value-of select="."/&gt;          &lt;xsl:if test="position() != last()"&gt;            &lt;xsl:value-of select="','" /&gt;          &lt;/xsl:if&gt;        &lt;/xsl:for-each&gt;  Output: CA:C,CB:AB,CC:BC</p>]]></description><pubDate>Fri, 06 Dec 2024 06:35:57 GMT</pubDate></item></channel></rss>