Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

counting number of lines in a text/csv file using xquery/xslt.

user12679330Aug 2 2011 — edited Aug 5 2011
Hi,
I have a CSV file, I need to count the total number of lines in that file. This I have to use in OSB. My requirement is I have to count total no of lines in the $body file (CSV/flat file) and subtract header and footer lines from it.


EX:
header,1, @total_no_of_detal@
detail,1
detail,2
detail,3
"
"
detail,n

footer, 1

If suppose i have 10 detail lines, and I am getting body of the file as shown above,

then in the final file, I have to change the body of the file as:

header,1, *10*
detail,1
detail,2
detail,3
"
"
detail,n

footer, 1


Please advice how to do this in OSB.

Edited by: user12679330 on Aug 2, 2011 2:34 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2011
Added on Aug 2 2011
8 comments
1,549 views