public String ToXML()
{
StringBuilder xml = new StringBuilder();
xml.Append("<CartGetResponse xmlns=\"http://webservices.amazon.com/AWSECommerceService/2007-07-16\">");
if (IsSetOperationRequest()) {
OperationRequest operationRequest = this.OperationRequest;
xml.Append("<OperationRequest>");
xml.Append(operationRequest.ToXMLFragment());
xml.Append("</OperationRequest>");
}
List<Cart> cartList = this.Cart;
foreach (Cart cart in cartList) {
xml.Append("<Cart>");
xml.Append(cart.ToXMLFragment());
xml.Append("</Cart>");
}
xml.Append("</CartGetResponse>");
return xml.ToString();
}