Splitting an xml based on the contents of xml either using java or xslt
I have a requirement,consider the below xml data Input1.xml <Envelope> <Notification> <Data> <Input>ABCDEFGHIJKLMN</Input> <Output>RESPONSEDATA</Output> </Data> <Data> <Input>OPQRSTUVWXYZ</Input> <Output>NEXTDATA</Output> </Data> <Data> <Input>ALPHABETS</Input> <Output>SOMEDATA</Output> </Data> </Notification> </Envelope> Now I want 3 output xmls with the response as shown below the file name to have first 6 characters ofABCDEFGHIJKLMN as output file name to have as shown below (FILE1)->ABCDEF.XML <Output>RESPONSEDATA</Output> (FILE2)->OPQRST.XML <Output>NEXTDATA</Output> (FILE3)->ALPHAB.XML