MarketplaceWebServiceProducts.Model.CompetitivePriceList.ToXMLFragment C# (CSharp) 메소드

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
        protected internal String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();
            List<CompetitivePriceType> competitivePriceObjList = this.CompetitivePrice;
            foreach (CompetitivePriceType competitivePriceObj in competitivePriceObjList) {
                xml.Append("<CompetitivePrice condition=" + "\"" +  EscapeXML(competitivePriceObj.condition)  + "\"" +  " subcondition=" + "\"" +  EscapeXML(competitivePriceObj.subcondition)  + "\"" +  " belongsToRequester=" + "\"" +  competitivePriceObj.belongsToRequester  + "\"" +  ">");
                xml.Append(competitivePriceObj.ToXMLFragment());
                xml.Append("</CompetitivePrice>");
            }
            return xml.ToString();
        }

Usage Example

예제 #1
0
        /// <summary>
        /// XML fragment representation of this object
        /// </summary>
        /// <returns>XML fragment for this object.</returns>
        /// <remarks>
        /// Name for outer tag expected to be set by calling method.
        /// This fragment returns inner properties representation only
        /// </remarks>


        protected internal String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();

            if (IsSetCompetitivePrices())
            {
                CompetitivePriceList competitivePricesObj = this.CompetitivePrices;
                xml.Append("<CompetitivePrices>");
                xml.Append(competitivePricesObj.ToXMLFragment());
                xml.Append("</CompetitivePrices>");
            }
            if (IsSetNumberOfOfferListings())
            {
                NumberOfOfferListingsList numberOfOfferListingsObj = this.NumberOfOfferListings;
                xml.Append("<NumberOfOfferListings>");
                xml.Append(numberOfOfferListingsObj.ToXMLFragment());
                xml.Append("</NumberOfOfferListings>");
            }
            if (IsSetTradeInValue())
            {
                MoneyType tradeInValueObj = this.TradeInValue;
                xml.Append("<TradeInValue>");
                xml.Append(tradeInValueObj.ToXMLFragment());
                xml.Append("</TradeInValue>");
            }
            return(xml.ToString());
        }