on 2012 Jul 05 8:03 AM
<p>Hi all,</p>
<p>Is it possible to get how manu characters in a content in xml? i.e., Example : In the following line " SAP Manufacturing Integration and Intelligence ", to get the
number of occurences of letter "i". Output should be: Number of occurences of letter "i" = 5.
I need it from XML content like,
<item>
<LINE>008:00000010,005:James,004:Bond,008:00000000,000:,001:0,022:0 - No time evaluation,010:01.01.2002,001:0;008:00000010,005:James,004:Bond,008:50001357,025:00 Sales Bord Computer UK,001:0,022:0 - No time evaluation,010:01.01.2002,001:0;008:00000069,007:Horatio,006:Holder,008:00000000,000:,001:0,022:0 - No time evaluation,010:01.01.2003,001:0;
</LINE>
</item>
to get the number of ";" from the above XML. Output: Number of ";"= 3. Pls say as soon as possible.</p>
Thanks.</p>
Request clarification before answering.
Hi Chandra sekar,
You can also use SQL query for your requirement. For that you need to create a SQL query with following query details
Select len('[Param.1]') - len(replace('[Param.1]', '[Param.2]', '')) as output
Here, Param.1 will have your string value and Param.2 will have delimiter ";"
After creating SQL query, in your transaction, select SQL query action block and map Param.1 and Param.2.
Now in query output, you will get number of occurrence of your delimiter in a string.
Regards,
Aravinth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use String List to XML with ; as your delimiter. Then use xpath to count the items and subtract one. If you have any reason to repeat on the items the Repeater action also provide the count.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.