in reply to XML::Twig handling arrays
Not really sure to understand your need,
but if you want to indent your output,
you can use this:
my $t = XML::Twig ->new( pretty_print => 'indented' ) ->parse($xml) ->print;
Output: <RateInfo> <displayCurrencyCode>USD</displayCurrencyCode> <DisplayNightlyRates size="3"> <displayNightlyRate>298.95</displayNightlyRate> <displayNightlyRate>298.95</displayNightlyRate> <displayNightlyRate>348.95</displayNightlyRate> </DisplayNightlyRates> <displayRoomRate>1106.62</displayRoomRate> <chargeableRoomRateTotal>1106.62</chargeableRoomRateTotal> <chargeableRoomRateTaxesAndFees>159.77</chargeableRoomRateTaxesAndFe +es> <nativeCurrencyCode>USD</nativeCurrencyCode> <NativeNightlyRates size="3"> <nativeNightlyRate>298.95</nativeNightlyRate> <nativeNightlyRate>298.95</nativeNightlyRate> <nativeNightlyRate>348.95</nativeNightlyRate> </NativeNightlyRates> <nativeRoomRate>1106.62</nativeRoomRate> <rateFrequency>B</rateFrequency> </RateInfo>
hth,
PooLpi
|
|---|