The below response is dynamic. Extra details get added to the response. I want to perform XSL Transformation to get a normal XML response . I would then convert it to get the below response in JSON format
Actual Response
<feed
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xml:base="https://abcd.xyz.com/sap/opu/odata/sap/ZHR_TIMESHEET_APPROVE_SER_GW_SRV/">
");">
<id>...</id>
<title type="text">FtTimesheetDetSet</title>
<updated>2016-04-19T11:46:21Z</updated>
");">
<author>...</author>
<link href="FtTimesheetDetSet" rel="self" title="FtTimesheetDetSet"/>
");">
<entry>
");">
<id> https://abcd.xyz.com/sap/opu/odata/sap/ZHR_TIMESHEET_APPROVE_SER_GW_SRV/FtTimesheetDetSet('1234') </id>
<title type="text">FtTimesheetDetSet('1234')</title>
<updated>2016-04-19T11:46:21Z</updated>
<category term="ZHR_TIMESHEET_APPROVE_SER_GW_SRV.FtTimesheetDet" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="FtTimesheetDetSet('1234')" rel="self" title="FtTimesheetDet"/>
");">
<content type="application/xml">
");">
<m:properties
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:Pernr>1234</d:Pernr>
<d:Ename>Test Name</d:Ename>
<d:Begda>2016-04-11T00:00:00</d:Begda>
<d:Endda>2016-04-17T00:00:00</d:Endda>
<d:NotCompleted/>
<d:Completed/>
<d:Submitted>X</d:Submitted>
<d:Approved/>
<d:Rejected/>
<d:Transferred/>
<d:CancelTransfer/>
<d:ReqReject/>
<d:Recall/>
<d:ReqUnlock/>
<d:ApprovedReject/>
<d:ApprovedUnlock/>
<d:ActualHours>80.00</d:ActualHours>
<d:TargetHours>40.00</d:TargetHours>
<d:AccessHours>0.00</d:AccessHours>
<d:BillableHours>80.00</d:BillableHours>
<d:NonbillableHours>0.00</d:NonbillableHours>
<d:LeaveHours>0.00</d:LeaveHours>
<d:HolidayHours>0.0</d:HolidayHours>
<d:Lastmodifiedby>A123</d:Lastmodifiedby>
<d:Remarks>Submitted</d:Remarks>
<d:Exempted/>
<d:Supvr>45678</d:Supvr>
<d:ReasonForTsUnlck/>
<d:Ccg2No/>
<d:Ccg2Name/>
<d:Ccg1No/>
<d:Ccg1Name/>
<d:Ccg1LdEid/>
<d:Ccg1LdName/>
</m:properties>
</content>
</entry>
</feed>
Required Response:
[ timesheet:{ employeeId:string name:string actualHours:integer targetHours:integer billableHours:integer nonBillableHours:integer leaveHours:integer holidayHours:integer currentState:string remarks:string } ]