ToXMLFragment() защищенный Метод

XML fragment representation of this object
Name for outer tag expected to be set by calling method. This fragment returns inner properties representation only
protected ToXMLFragment ( ) : String
Результат String
Пример #1
0
        /// <summary>
        /// XML Representation for this object
        /// </summary>
        /// <returns>XML String</returns>

        public String ToXML()
        {
            StringBuilder xml = new StringBuilder();

            xml.Append("<GetProductCategoriesForSKUResponse xmlns=\"http://mws.amazonservices.com/schema/Products/2011-10-01\">");
            if (IsSetGetProductCategoriesForSKUResult())
            {
                GetProductCategoriesForSKUResult getProductCategoriesForSKUResult = this.GetProductCategoriesForSKUResult;
                xml.Append("<GetProductCategoriesForSKUResult>");
                xml.Append(getProductCategoriesForSKUResult.ToXMLFragment());
                xml.Append("</GetProductCategoriesForSKUResult>");
            }
            if (IsSetResponseMetadata())
            {
                ResponseMetadata responseMetadata = this.ResponseMetadata;
                xml.Append("<ResponseMetadata>");
                xml.Append(responseMetadata.ToXMLFragment());
                xml.Append("</ResponseMetadata>");
            }
            xml.Append("</GetProductCategoriesForSKUResponse>");
            return(xml.ToString());
        }
        /// <summary>
        /// XML Representation for this object
        /// </summary>
        /// <returns>XML String</returns>

        public String ToXML()
        {
            StringBuilder xml = new StringBuilder();

            xml.Append("<ListMatchingProductsResponse xmlns=\"http://mws.amazonservices.com/schema/Products/2011-10-01\">");
            if (IsSetListMatchingProductsResult())
            {
                ListMatchingProductsResult listMatchingProductsResult = this.ListMatchingProductsResult;
                xml.Append("<ListMatchingProductsResult>");
                xml.Append(listMatchingProductsResult.ToXMLFragment());
                xml.Append("</ListMatchingProductsResult>");
            }
            if (IsSetResponseMetadata())
            {
                ResponseMetadata responseMetadata = this.ResponseMetadata;
                xml.Append("<ResponseMetadata>");
                xml.Append(responseMetadata.ToXMLFragment());
                xml.Append("</ResponseMetadata>");
            }
            xml.Append("</ListMatchingProductsResponse>");
            return(xml.ToString());
        }
        /// <summary>
        /// XML Representation for this object
        /// </summary>
        /// <returns>XML String</returns>

        public String ToXML()
        {
            StringBuilder xml = new StringBuilder();

            xml.Append("<GetLowestOfferListingsForSKUResponse xmlns=\"http://mws.amazonservices.com/schema/Products/2011-10-01\">");
            List <GetLowestOfferListingsForSKUResult> getLowestOfferListingsForSKUResultList = this.GetLowestOfferListingsForSKUResult;

            foreach (GetLowestOfferListingsForSKUResult getLowestOfferListingsForSKUResult in getLowestOfferListingsForSKUResultList)
            {
                xml.Append("<GetLowestOfferListingsForSKUResult SellerSKU=" + "\"" + EscapeXML(getLowestOfferListingsForSKUResult.SellerSKU) + "\"" + " status=" + "\"" + EscapeXML(getLowestOfferListingsForSKUResult.status) + "\"" + ">");
                xml.Append(getLowestOfferListingsForSKUResult.ToXMLFragment());
                xml.Append("</GetLowestOfferListingsForSKUResult>");
            }
            if (IsSetResponseMetadata())
            {
                ResponseMetadata responseMetadata = this.ResponseMetadata;
                xml.Append("<ResponseMetadata>");
                xml.Append(responseMetadata.ToXMLFragment());
                xml.Append("</ResponseMetadata>");
            }
            xml.Append("</GetLowestOfferListingsForSKUResponse>");
            return(xml.ToString());
        }