View Single Post
  #1 (permalink)  
Old April 19th, 2013, 02:34 PM
Sarayu Sarayu is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how awrite an rule using xml

Hello Every body,

Can any one please help me in writing an rule in xml.

for example:

sample.txt is my input file

sample.txt :

186886ITANALYST10000
198806COSULTANT20000


This is the sample data from my upstream.


Now i have sample rules like first 6 characters are unique employee number
and next 9 characters are designation and next 5 characters are salary. now i have to send a different format to my downstream. i.e my sample file will be

18688610,000$
19880620,000$

Can i achieve this by using xml rules or is there any other method. I am using java. i have to write java code to read the xml and apply the rule on each record and prepare the sample output which needs to be sent to down streams.

I have used xslt to transform one xml to other xml but i exactly do not know about doing some transformations on the data in text file and send the output in text file as well.

ManyThanks
Sarayu