Specific Info from XML Document



I'm trying to parse XML data and having a hard time doing it. Here is the XML part



<?xml version="1.0"?> <GetLowestOfferListingsForASINResponse xmlns="http://ift.tt/1iBZrs1"> <GetLowestOfferListingsForASINResult ASIN="b0091raue4" status="Success"> <AllOfferListingsConsidered>true</AllOfferListingsConsidered> <Product xmlns="http://ift.tt/1iBZrs1" xmlns:ns2="http://ift.tt/1iBZq7r">
<Identifiers>
<MarketplaceASIN>
<MarketplaceId>ATVPDKIKX0DER</MarketplaceId>
<ASIN>b0091raue4</ASIN>
</MarketplaceASIN>
</Identifiers>
<LowestOfferListings>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>New</ItemCondition>
<ItemSubcondition>New</ItemSubcondition>
<FulfillmentChannel>Amazon</FulfillmentChannel>
<ShipsDomestically>True</ShipsDomestically>
<ShippingTime>
<Max>0-2 days</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>98-100%</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>7</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>723</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>USD</CurrencyCode>
<Amount>28.70</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>USD</CurrencyCode>
<Amount>28.70</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>USD</CurrencyCode>
<Amount>0.00</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
</LowestOfferListing>
<LowestOfferListing>
<Qualifiers>
<ItemCondition>New</ItemCondition>
<ItemSubcondition>New</ItemSubcondition>
<FulfillmentChannel>Amazon</FulfillmentChannel>
<ShipsDomestically>True</ShipsDomestically>
<ShippingTime>
<Max>0-2 days</Max>
</ShippingTime>
<SellerPositiveFeedbackRating>95-97%</SellerPositiveFeedbackRating>
</Qualifiers>
<NumberOfOfferListingsConsidered>1</NumberOfOfferListingsConsidered>
<SellerFeedbackCount>27</SellerFeedbackCount>
<Price>
<LandedPrice>
<CurrencyCode>USD</CurrencyCode>
<Amount>29.00</Amount>
</LandedPrice>
<ListingPrice>
<CurrencyCode>USD</CurrencyCode>
<Amount>29.00</Amount>
</ListingPrice>
<Shipping>
<CurrencyCode>USD</CurrencyCode>
<Amount>0.00</Amount>
</Shipping>
</Price>
<MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
</LowestOfferListing>


I want to loop through all of the "LowestOfferListing" nodes just return the "ItemCondition" and "Amount".


I have tried putting the data into an XML document, dataset, and datatable. Here is where i am at:



Dim xml As New Xml.XmlDocument()
xml.LoadXml(responseBody)
Dim ds As New DataSet
ds.ReadXml(New StringReader(responseBody))


Does anyone know how to loop through and retireve just these two values?


No comments:

Post a Comment