Topic
No replies
NaingSoe
NaingSoe
1 Post
ACCEPTED ANSWER

Pinned topic How to read multiple occurance in xml with xpath

‏2011-03-21T07:33:18Z |
Hi,

In the data stage xml Input,I would like to know how to read multiple occurrences of same node in xml with xpath and would like to concentrate them as one with new Line seperator.

The following is my xml sample.

<DETAIL>
<MARKS_NUM_INFO>
<MARKS_NUM>100</MARKS_NUM>
<MARKS_NUM>200</MARKS_NUM>
<MARKS_NUM>300</MARKS_NUM>
</MARKS_NUM_INFO>
</DETAIL>

The desire output is : 100 (new line separator) 200 (new line separator) 300.

I've tried the following.
<xsl:for-each select="/DETAIL/MARKS_NUM_INFO"><xsl:value-of select="MARKS_NUM" separator ="char(10)" /></xsl:for-each>

But it doesn't work error : "The transformation XSLT stylesheet is invalid."

If anybody how to do this, please kindly help me. Thanks in advance.

Regards
Naing Soe