xml xslt help - transform is not rendering correctly soap

BrianJ

New Member
i have an xml file like for binding:\[code\] <Success> <result> <Sno>1115</Sno> <AccommodationID>6001</AccommodationID> <RoomID>2</RoomID> <BookingID>70</BookingID> <RatePlanId>1</RatePlanId> <PinCode>3147</PinCode> <HotelID>6001</HotelID> <Affiliate_id>0</Affiliate_id> <Affiliate_label></Affiliate_label> <Begin_date>2012-05-30T01:11:47.627</Begin_date> <Rooms_qty>1</Rooms_qty> <Booker_firstname>Hamza</Booker_firstname> <Booker_lastname>Ali</Booker_lastname> <Dc_start_date>2012-5-10</Dc_start_date> <End_date>2012-05-30T01:11:47.627</End_date> <Guest_city>karachi</Guest_city> <Guest_country>pk</Guest_country> <Guest_email>[email protected]</Guest_email> <Guest_language>en</Guest_language> <Guest_name>Hamza Liaquat Ali,faizan,arbaz</Guest_name> <Rooms>2</Rooms> <Guest_qty>1,1,1</Guest_qty> <Guest_street>Garden%2C+Karachi</Guest_street> <Guest_telephone>923152679921</Guest_telephone> <Guest_zip>0315</Guest_zip> <Smoking>1</Smoking> <Incremental_prices>1485</Incremental_prices> <Show_test>0</Show_test> <Test_mode>0</Test_mode> <CreditCardID>1</CreditCardID> <CreditCardName>Hamza+Liaquat+Ali</CreditCardName> <ExpiryDate1>2012-09-01</ExpiryDate1> <CVCCode>345</CVCCode> <Comments>test</Comments> <IsActive>1</IsActive> <CreateDate>2012-05-29T03:27:43.587</CreateDate> <LastModified>Apr 25 2012 7:03AM</LastModified> <RoomName>Deluxe Double Room</RoomName> <RoomDescription>Deluxe double Room</RoomDescription> <RatePlanName>Standard</RatePlanName> <PolicyComments>Payment is required at the time of check-in.</PolicyComments> <Breakfast>Continental breakfast is included from 07:00 to 09:30</Breakfast> <RoomFacilities>Carpet Flooring,Electronic Key Card,Safety Deposit Box,Sofa Bed,Toilet,Work Desk,Coffee/Tea Making Facilities,Hairdryer,Iron and Ironing Board,Kettle,Telephone,Television (Flat-screen)</RoomFacilities> </result> </Success>\[/code\]Want Result Like this in xml:\[code\]<?xml version="1.0" encoding="utf-8"?> <HotelReservations> <HotelReservation CreateDateTime="2012-03-09T21:31:52+02:00"> <UniqueID Type="14" ID="2743"/> <RoomStays> <RoomStay> <RoomRates> <RoomRate RoomTypeCode="5" RatePlanCode="2" NumberOfUnits="1"> <Rates> <Rate UnitMultiplier="1" RateTimeUnit="Day" EffectiveDate="2012-03-12" ExpireDate="2012-03-14"> <Total AmountAfterTax="620.00" CurrencyCode="GBP"> <Taxes> <Tax Amount="0.00" CurrencyCode="GBP"/> </Taxes> </Total> </Rate> </Rates> </RoomRate> </RoomRates> <GuestCounts IsPerRoom="1"> <GuestCount AgeQualifyingCode="10" Count="2"/> </GuestCounts> <TimeSpan Start="2012-03-12" End="2012-03-14"/> <Total AmountAfterTax="620.00" CurrencyCode="GBP"/> <BasicPropertyInfo HotelCode="6001" HotelName="Comfort...."/> <SpecialRequests> <SpecialRequest Name="special request"> <Text>will be travelling...</Text> </SpecialRequest> </SpecialRequests> </RoomStay> </RoomStays> <ResGuests> <ResGuest ResGuestRPH="1" ArrivalTime="00:00:00" PrimaryIndicator="1"> <Profiles> <ProfileInfo> <Profile ProfileType="1"> <Customer> <PersonName> <GivenName>asd</GivenName> <Surname>test</Surname> </PersonName> <Telephone PhoneNumber="03213999209"/> <Email>[email protected]</Email> <Address> <AddressLine>809, test</AddressLine> <CityName>test</CityName> <PostalCode>74400</PostalCode> <StateProv>test</StateProv> <CountryName Code="PK">Pakistan</CountryName> </Address> </Customer> </Profile> </ProfileInfo> </Profiles> </ResGuest> </ResGuests> <ResGlobalInfo> <Total CurrencyCode="GBP" AmountAfterTax="620.00"/> <!--Either Guarantee or DepositPayments would be present if payments have been accepted against the reservation.--> <DepositPayments> <GuaranteePayment> <AcceptedPayments> <AcceptedPayment> <PaymentCard CardNumber="3414134314143" CardType="1" ExpireDate="0614" SeriesCode="123" CardCode="VI"> <CardHolderName>hamza Asif</CardHolderName> </PaymentCard> </AcceptedPayment> </AcceptedPayments> <AmountPercent Amount="620.00" CurrencyCode="GBP"/> </GuaranteePayment> </DepositPayments> </ResGlobalInfo> </HotelReservation> </HotelReservations> </OTA_HotelResNotifRQ> </soapenv:Body></soapenv:Envelope>\[/code\]Please Help I want the transformation correctly.please help i want the correct xslt method please help.I want the correct xslt for this xml.thank you
 
Back
Top