Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: XML::Twig handling arrays

by poolpi (Hermit)
on Dec 02, 2008 at 09:09 UTC ( [id://727336]=note: print w/replies, xml ) Need Help??


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

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://727336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found