I am having a xml file as:
<Order>
<EP>
<Name>Generation Date</Name>
<Value>2009-08-04+05:30</Value>
</EP>
<EP>
<Name>NoOfRecords</Name>
<Value>100</Value>
</EP>
<OrderLineItems>
<OrderLineItem OrderDateTime="2007-01-01T17:09:04.593+05:30>
<Customer>
<FullName>Mrs S </FulName>
<Address>
<AddressLine1>ABC</AddressLine1>
<AddressLine2>XYZ</AddressLine2>
</Address>
</Customer>
<EP>
<Name>DealerAccount</Name>
<Value>00000000000</Value>
</EP>
</OrderLineItem>
</OrderLineItems>
</Order>
Where the OrderLineItem tag is repeating. Now I want to convert this xml to a text file using xslt. The format of flat file is fixed and it’s as follows:
00000000000010107 Mrs S ABC XYZ
00000000000150709 Mr x PQR TWR
where the first column contains the Dealeraccount and orderDate(time removed) second field is name and third and fourth field are addressline 1 and addressline2 respectively.
Please note that the formatting of text file is must and I am also having the length of each field such as length of name is varchar2(50) and so on.
Well finally i got it..here is the solution
And then simply call this template using: