在Rails控制台中,我看到的输出如下:
<AmazonProduct::Response:0x00000102dd9070 @body=\"<?xml version=\\\"1.0\\\" ?><ItemSearchResponse xmlns=\\\"http://webservices.amazon.com/AWSECommerceService/2011-08-01\\\"><OperationRequest><HTTPHeaders><Header Name=\\\"UserAgent\\\" Value=\\\"Ruby\\\"></Header></HTTPHeaders><RequestId>13a86d54-dc7c-4ee1-afc2-26bdeadfd914</RequestId><Arguments><Argument Name=\\\"Operation\\\" Value=\\\"ItemSearch\\\"></Argument><Argument Name=\\\"Service\\\" Value=\\\"AWSECommerceService\\\"></Argument> etc etc
是否有一个宝石会自动将它全部嵌套,如下所示:
<SubTotal>
<Amount>2998</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$29.98</FormattedPrice>
</SubTotal>