protected internal String ToXMLFragment()
{
StringBuilder xml = new StringBuilder();
if (IsSetBenefitType()) {
xml.Append("<BenefitType>");
xml.Append(EscapeXML(this.BenefitType));
xml.Append("</BenefitType>");
}
if (IsSetComponentType()) {
xml.Append("<ComponentType>");
xml.Append(EscapeXML(this.ComponentType));
xml.Append("</ComponentType>");
}
if (IsSetQuantity()) {
xml.Append("<Quantity>");
xml.Append(this.Quantity);
xml.Append("</Quantity>");
}
if (IsSetPercentOff()) {
xml.Append("<PercentOff>");
xml.Append(this.PercentOff);
xml.Append("</PercentOff>");
}
if (IsSetFixedAmount()) {
Price fixedAmount = this.FixedAmount;
xml.Append("<FixedAmount>");
xml.Append(fixedAmount.ToXMLFragment());
xml.Append("</FixedAmount>");
}
if (IsSetCeiling()) {
Price ceiling = this.Ceiling;
xml.Append("<Ceiling>");
xml.Append(ceiling.ToXMLFragment());
xml.Append("</Ceiling>");
}
return xml.ToString();
}