Does anyone know of a library out there (preferably in C#) that will take classes and generate XML or flat files suitable for feeds to Amazon Marketplace Web Services?
In other words, I'd like to do something like this:
var feed = new AmazonProductFeed();
var list = new AmazonProductList();
var product1 = new AmazonProduct();
product1.Name = "Product 1";
list.Add(product1);
var product2 = new AmazonProduct();
product2.Name = "Product 2";
list.Add(product2);
feed.Products = list;
// spits out XML compliant with Amazon's schema
Console.Write(feed.ToXml());
It looks like the only code Amazon provides are wrappers for the web service itself and the directory-based transport utility (AMTU).
Senior Member. You read it as "ei-cee" (no "slash" pronounced). In terms of distinguishing between "air conditioning" and "air conditioner," I can think of an example like "Today, I bought a new air conditioner" ("conditioning" not allowed). I personally would not say "Today, I bought a new AC."
Air conditioning, often abbreviated as A/C or AC, is the process of removing heat from an enclosed space to achieve a more comfortable interior environment (sometimes referred to as 'comfort cooling') and in some cases also strictly controlling the humidity of internal air.
What A/C Means. The term “A/C” stands for “air conditioning,” but it's frequently used to describe any type of home cooling equipment, such as a traditional split-system air conditioner or heat pump, mini-split unit, geothermal system, or even a window unit.
In the air conditioning industry, the term HVAC is often used instead of AC. HVAC refers to heating, ventilation, and air conditioning, whereas AC simply refers to air conditioning. AC is generally used when referring to systems that are designed to cool the air in your home.
The .NET XML Schema Definition Tool can be used to generate classes from any XSD and can be used in conjunction with the XML Serializer to do what's described.
The Selling On Amazon Guide to XML (SOA-GuideToXML.pdf) does not contain references to the correct XSDs. The links are inconsistent with the XSDs that are reprinted in the document. My old link to correct XSDs is no longer valid. My best guess is that they can be found here (requires a Seller Central login).
This (very long) command will generate all the needed classes so far as I know. Note that you will need to make some minor changes in the generated file. I don't remember which way it worked, but I either needed to change certain 2-D arrays to 1-D arrays ([][] to []) or vice-versa. I remember the places where I had to make these changes being fairly obvious:
xsd xsd\amzn-base.xsd xsd\amzn-envelope.xsd xsd\amzn-header.xsd xsd\AttributeGroups.xsd xsd\AutoAccessory.xsd xsd\Beauty.xsd xsd\CameraPhoto.xsd xsd\CatPIL.xsd xsd\CE.xsd xsd\ClothingAccessories.xsd xsd\Customer.xsd xsd\CustomerAddress.xsd xsd\FoodAndBeverages.xsd xsd\FulfillmentCenter.xsd xsd\FulfillmentOrderCancellationRequest.xsd xsd\FulfillmentOrderRequest.xsd xsd\Gourmet.xsd xsd\Health.xsd xsd\Home.xsd xsd\HomeImprovement.xsd xsd\Image.xsd xsd\Inventory.xsd xsd\Item.xsd xsd\Jewelry.xsd xsd\Lighting.xsd xsd\Listings.xsd xsd\ListingSummary.xsd xsd\Loyalty.xsd xsd\MerchantListingsReport.xsd xsd\Miscellaneous.xsd xsd\MultiChannelOrderReport.xsd xsd\Music.xsd xsd\MusicalInstruments.xsd xsd\NavigationReport.xsd xsd\Offer.xsd xsd\Office.xsd xsd\OrderAcknowledgement.xsd xsd\OrderAdjustment.xsd xsd\OrderFulfillment.xsd xsd\OrderNotificationReport.xsd xsd\OrderReport.xsd xsd\Override.xsd xsd\PaymentMethod.xsd xsd\PetSupplies.xsd xsd\Price.xsd xsd\ProcessingReport.xsd xsd\Product.xsd xsd\ProductAttributes.xsd xsd\ProductClothing.xsd xsd\ProductImage.xsd xsd\Relationship.xsd xsd\ReverseFeed.xsd xsd\SettlementReport.xsd xsd\Sports.xsd xsd\Store.xsd xsd\SWVG.xsd xsd\TiresAndWheels.xsd xsd\Tools.xsd xsd\ToysBaby.xsd xsd\TypeDefinitions.xsd xsd\Video.xsd xsd\WebstoreItem.xsd xsd\Wireless.xsd /c /n:WebLinc.Services.Amazon.Marketplace > output.txt 2>&1
pause
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With