protected internal String ToXMLFragment()
{
StringBuilder xml = new StringBuilder();
if (IsSetOfferListingId()) {
xml.Append("<OfferListingId>");
xml.Append(EscapeXML(this.OfferListingId));
xml.Append("</OfferListingId>");
}
if (IsSetExchangeId()) {
xml.Append("<ExchangeId>");
xml.Append(EscapeXML(this.ExchangeId));
xml.Append("</ExchangeId>");
}
if (IsSetPrice()) {
Price price = this.Price;
xml.Append("<Price>");
xml.Append(price.ToXMLFragment());
xml.Append("</Price>");
}
if (IsSetSalePrice()) {
Price salePrice = this.SalePrice;
xml.Append("<SalePrice>");
xml.Append(salePrice.ToXMLFragment());
xml.Append("</SalePrice>");
}
if (IsSetAmountSaved()) {
Price amountSaved = this.AmountSaved;
xml.Append("<AmountSaved>");
xml.Append(amountSaved.ToXMLFragment());
xml.Append("</AmountSaved>");
}
if (IsSetPercentageSaved()) {
xml.Append("<PercentageSaved>");
xml.Append(this.PercentageSaved);
xml.Append("</PercentageSaved>");
}
if (IsSetAvailability()) {
xml.Append("<Availability>");
xml.Append(EscapeXML(this.Availability));
xml.Append("</Availability>");
}
if (IsSetAvailabilityAttributes()) {
AvailabilityAttributes availabilityAttributes = this.AvailabilityAttributes;
xml.Append("<AvailabilityAttributes>");
xml.Append(availabilityAttributes.ToXMLFragment());
xml.Append("</AvailabilityAttributes>");
}
if (IsSetQuantity()) {
xml.Append("<Quantity>");
xml.Append(this.Quantity);
xml.Append("</Quantity>");
}
if (IsSetISPUStoreAddress()) {
Address ISPUStoreAddress = this.ISPUStoreAddress;
xml.Append("<ISPUStoreAddress>");
xml.Append(ISPUStoreAddress.ToXMLFragment());
xml.Append("</ISPUStoreAddress>");
}
if (IsSetISPUStoreHours()) {
xml.Append("<ISPUStoreHours>");
xml.Append(EscapeXML(this.ISPUStoreHours));
xml.Append("</ISPUStoreHours>");
}
if (IsSetIsEligibleForSuperSaverShipping()) {
xml.Append("<IsEligibleForSuperSaverShipping>");
xml.Append(this.IsEligibleForSuperSaverShipping);
xml.Append("</IsEligibleForSuperSaverShipping>");
}
if (IsSetSalesRestriction()) {
xml.Append("<SalesRestriction>");
xml.Append(EscapeXML(this.SalesRestriction));
xml.Append("</SalesRestriction>");
}
List<ShippingCharge> shippingChargeList = this.ShippingCharge;
foreach (ShippingCharge shippingCharge in shippingChargeList) {
xml.Append("<ShippingCharge>");
xml.Append(shippingCharge.ToXMLFragment());
xml.Append("</ShippingCharge>");
}
return xml.ToString();
}