我有一些非常“深”的 XML(见底部),并且正在努力使用 minidom 或 elementtree 来获得我需要的值 - 知道获得粗体值 (VALUE_TO_GET) 的最简单方法是什么会有不同数量的LowestOfferListing
标签?我基本上需要为每个获取LandedPrice
/的第一个实例,并且找不到这样做的简单(ish)方法!Amount
SKUIdentifier
<?xml version="1.0" ?>
<GetLowestOfferListingsForSKUResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetLowestOfferListingsForSKUResult SellerSKU="X" status="Success">
<AllOfferListingsConsidered>true</AllOfferListingsConsidered>
<Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01"
xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd">
<Identifiers>
<MarketplaceASIN>
<MarketplaceId>X</MarketplaceId>
<ASIN>X</ASIN>
</MarketplaceASIN>
<SKUIdentifier>
<MarketplaceId>X</MarketplaceId>
<SellerId>X</SellerId>
<SellerSKU>**VALUE_TO_GET**</SellerSKU>
</SKUIdentifier>
</Identifiers>
<LowestOfferListings>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>New</ItemCondition>
<ItemSubcondition>New</ItemSubcondition>
<FulfillmentChannel>Amazon</FulfillmentChannel>
<ShipsDomestically>True</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>3</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>**VALUE_TO_GET**</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>Merchant</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>X</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>X</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>X</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>X</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
</LowestOfferListings>
</Product>
</GetLowestOfferListingsForSKUResult>
<GetLowestOfferListingsForSKUResult SellerSKU="X" status="X">
<AllOfferListingsConsidered>X</AllOfferListingsConsidered>
<Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01"
xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd">
<Identifiers>
<MarketplaceASIN>
<MarketplaceId>X</MarketplaceId>
<ASIN>X</ASIN>
</MarketplaceASIN>
<SKUIdentifier>
<MarketplaceId>X</MarketplaceId>
<SellerId>X</SellerId>
<SellerSKU>**VALUE_TO_GET**</SellerSKU>
</SKUIdentifier>
</Identifiers>
<LowestOfferListings>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>1</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>**VALUE_TO_GET**</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>8</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>Merchant</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>4</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>X</ItemCondition>
<ItemSubcondition>X</ItemSubcondition>
<FulfillmentChannel>X</FulfillmentChannel>
<ShipsDomestically>X</ShipsDomestically>
<ShippingTime>
<Max>X</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>X</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>1</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>X</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>X</CurrencyCode>
<Amount>X</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>X</MultipleOffersAtLowestPrice>
</LowestOfferListing>
</LowestOfferListings>
</Product>
</GetLowestOfferListingsForSKUResult>
<ResponseMetadata>
<RequestId>X</RequestId>
</ResponseMetadata>
</GetLowestOfferListingsForSKUResponse>