C# 如何从xml反序列化数组

C# 如何从xml反序列化数组,c#,xml,deserialization,C#,Xml,Deserialization,因此,我一直在尝试反序列化此XML: <DCR> <Xcore_PD12M_ALL_PC_NC_Global> <Xcore>411</Xcore> <Categoria_de_Riesgo>Risk Alert</Categoria_de_Riesgo> <Probabilidad_de_incumplimiento>91.75</Probabilidad_de_

因此,我一直在尝试反序列化此XML:

<DCR>
   <Xcore_PD12M_ALL_PC_NC_Global>
      <Xcore>411</Xcore>
      <Categoria_de_Riesgo>Risk Alert</Categoria_de_Riesgo>
      <Probabilidad_de_incumplimiento>91.75</Probabilidad_de_incumplimiento>
      <HorizonteTiempo>
         <Desde>02.2018</Desde>
         <Hasta>01.2019</Hasta>
      </HorizonteTiempo>
      <Odds>
         <Odds_A_Favor>1</Odds_A_Favor>
         <Odds_EnContra>11.1</Odds_EnContra>
         <ObligorAzar>12.1</ObligorAzar>
         <ObligorIncumplimiento>11.1</ObligorIncumplimiento>
         <PorcientoDeudorIncumplimiento>97.61</PorcientoDeudorIncumplimiento>
         <PorcientoDeudorNoIncumplimiento>2.39</PorcientoDeudorNoIncumplimiento>
         <QuantilPoblacion>29.89</QuantilPoblacion>
      </Odds>
      <Mes_evaluacion>01.2018</Mes_evaluacion>
   </Xcore_PD12M_ALL_PC_NC_Global>
   <DeudasPorProducto>
      <Producto Nombre="Tarjeta de Crédito">
         <EstatusImg>CR</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>2</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">15000</CreditoAprobado>
         <TotalAdeudado>23488</TotalAdeudado>
         <Cuota>2194</Cuota>
         <EnAtraso />
         <EnLegal />
         <Castigado>17504</Castigado>
      </Producto>
      <Producto Nombre="Tarjeta de Crédito">
         <EstatusImg>CN</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>1</CantidadCuentas>
         <CreditoAprobado Moneda="U.S. $">219</CreditoAprobado>
         <TotalAdeudado />
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Producto Nombre="SERVICIOS">
         <EstatusImg>CR</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>1</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">2534</CreditoAprobado>
         <TotalAdeudado>2534</TotalAdeudado>
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado>2534</Castigado>
      </Producto>
      <Producto Nombre="Producto de Telecomunicaciones">
         <EstatusImg>CG</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>3</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">3021</CreditoAprobado>
         <TotalAdeudado>1979</TotalAdeudado>
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Producto Nombre="Préstamo">
         <EstatusImg>CN</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>2</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">40000</CreditoAprobado>
         <TotalAdeudado />
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Total ID="R.D. $ PESO">
         <Total_CreditoAprobado>$60,555</Total_CreditoAprobado>
         <Total_Adeudado>$28,001</Total_Adeudado>
         <Total_Cuota>$2,194</Total_Cuota>
         <Total_EnAtraso />
         <Total_EnLegal />
         <Total_Castigado>$20,038</Total_Castigado>
      </Total>
      <Total ID="U.S. $ DOLAR">
         <Total_CreditoAprobado>$219</Total_CreditoAprobado>
         <Total_Adeudado />
         <Total_Cuota />
         <Total_EnAtraso />
         <Total_EnLegal />
         <Total_Castigado />
      </Total>
   </DeudasPorProducto>
</DCR>

411
风险警报
91.75
2.2018
1.2019
1.
11.1
12.1
11.1
97.61
2.39
29.89
1.2018
铬
2.
15000
23488
2194
17504
CN
1.
219
铬
1.
2534
2534
2534
CG
3.
3021
1979
CN
2.
40000
$60,555
$28,001
$2,194
$20,038
$219
并且在反序列化此节时遇到问题:

<DeudasPorProducto>
      <Producto Nombre="Tarjeta de Crédito">
         <EstatusImg>CR</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>2</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">15000</CreditoAprobado>
         <TotalAdeudado>23488</TotalAdeudado>
         <Cuota>2194</Cuota>
         <EnAtraso />
         <EnLegal />
         <Castigado>17504</Castigado>
      </Producto>
      <Producto Nombre="Tarjeta de Crédito">
         <EstatusImg>CN</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>1</CantidadCuentas>
         <CreditoAprobado Moneda="U.S. $">219</CreditoAprobado>
         <TotalAdeudado />
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Producto Nombre="SERVICIOS">
         <EstatusImg>CR</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>1</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">2534</CreditoAprobado>
         <TotalAdeudado>2534</TotalAdeudado>
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado>2534</Castigado>
      </Producto>
      <Producto Nombre="Producto de Telecomunicaciones">
         <EstatusImg>CG</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>3</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">3021</CreditoAprobado>
         <TotalAdeudado>1979</TotalAdeudado>
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Producto Nombre="Préstamo">
         <EstatusImg>CN</EstatusImg>
         <EstatusImg2 />
         <CantidadCuentas>2</CantidadCuentas>
         <CreditoAprobado Moneda="R.D. $">40000</CreditoAprobado>
         <TotalAdeudado />
         <Cuota />
         <EnAtraso />
         <EnLegal />
         <Castigado />
      </Producto>
      <Total ID="R.D. $ PESO">
         <Total_CreditoAprobado>$60,555</Total_CreditoAprobado>
         <Total_Adeudado>$28,001</Total_Adeudado>
         <Total_Cuota>$2,194</Total_Cuota>
         <Total_EnAtraso />
         <Total_EnLegal />
         <Total_Castigado>$20,038</Total_Castigado>
      </Total>
      <Total ID="U.S. $ DOLAR">
         <Total_CreditoAprobado>$219</Total_CreditoAprobado>
         <Total_Adeudado />
         <Total_Cuota />
         <Total_EnAtraso />
         <Total_EnLegal />
         <Total_Castigado />
      </Total>
   </DeudasPorProducto>

铬
2.
15000
23488
2194
17504
CN
1.
219
铬
1.
2534
2534
2534
CG
3.
3021
1979
CN
2.
40000
$60,555
$28,001
$2,194
$20,038
$219
如您所见,元素“Producto”与另一个名为“Total”的元素混合在一起,这可能是它没有反序列化的原因。以下是我正在使用的类:

public  class DeudasPorProducto
    {
        [XmlElement("Producto")]
        public List<Producto> Productos { get; set; }
    }


 public class Xcore
    {
        [XmlElement("Xcore")]
        public int CrediScore { get; set; }

        [XmlElement("Categoria_de_Riesgo")]
        public string CategoriaRiesgo { get; set; }

        [XmlElement("Probabilidad_de_incumplimiento")]
        public double ProbabilidadIncumplimiento { get; set; }

        [XmlElement("HorizonteTiempo")]
        public Timeline HorizonteTiempo { get; set; }
        [XmlElement("Odds")]
        public Odds Odds { get; set; }

        [XmlElement("Mes_evaluacion")]
        public string MesEvaluacion { get; set; }

        [XmlElement("DeudasPorProducto")]
        public DeudasPorProducto Deudas { get; set; }


    }

   [XmlRoot("DCR")]
  public  class DataCreditoCreditReport
    {
        [XmlElement("Xcore_PD12M_ALL_PC_NC_Global")]
    public   Xcore Xcore { get; set; }
    }
公共类DeudasPorProducto
{
[XmlElement(“Producto”)]
公共列表产品{get;set;}
}
公共类Xcore
{
[XmlElement(“Xcore”)]
public int CrediScore{get;set;}
[XmlElement(“分类”)]
公共字符串categoriesgo{get;set;}
[XmlElement(“潜在风险”)]
公共双概率嵌入{get;set;}
[XmlElement(“HorizontateTimepo”)]
公共时间轴HorizontateTimepo{get;set;}
[XmlElement(“赔率”)]
公众赔率{get;set;}
[XmlElement(“Mes_evaluacion”)]
公共字符串MesEvaluacion{get;set;}
[XmlElement(“DeudasPorProducto”)]
公共deudasporoducto Deudas{get;set;}
}
[XmlRoot(“DCR”)]
公共类DataCreditoCreditReport
{
[XmlElement(“Xcore\u PD12M\u ALL\u PC\u NC\u Global”)]
公共Xcore Xcore{get;set;}
}
我最后尝试的是在Xcore上将Producto类用作列表作为属性:

   [XmlArray("DeudasPorProducto")]
    [XmlArrayItem("Producto")]
    public List<Producto> Productos { get; set; }
[XmlArray(“deudasporoducto”)]
[XmlArrayItem(“Producto”)]
公共列表产品{get;set;}

但没花多少时间。在这一点上我需要帮助。:)

如果您复制问题中的XML示例,并使用Visual Studio将其粘贴为类(编辑菜单->粘贴特殊->将XML粘贴为类),它将为您提供大约900行的样板代码(其中大部分是非常冗余的),但这将毫无问题地反序列化,并且应该为您提供一个不错的起点

        var xmlSerializer = new XmlSerializer(typeof(XmlClasses.DCR));

        using (var fileStream = new FileStream(@"TestXml.xml", FileMode.Open, FileAccess.Read, FileShare.Read))
        {
            var dcr = (XmlClasses.DCR)xmlSerializer.Deserialize(fileStream);
        }
然后,您应该能够开始使用XmlElement属性调整属性名

public class XmlClasses
{
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class DCR
    {

        private DCRXcore_PD12M_ALL_PC_NC_Global xcore_PD12M_ALL_PC_NC_GlobalField;

        private DCRDeudasPorProducto deudasPorProductoField;

        /// <remarks/>
        public DCRXcore_PD12M_ALL_PC_NC_Global Xcore_PD12M_ALL_PC_NC_Global
        {
            get
            {
                return this.xcore_PD12M_ALL_PC_NC_GlobalField;
            }
            set
            {
                this.xcore_PD12M_ALL_PC_NC_GlobalField = value;
            }
        }

        /// <remarks/>
        public DCRDeudasPorProducto DeudasPorProducto
        {
            get
            {
                return this.deudasPorProductoField;
            }
            set
            {
                this.deudasPorProductoField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRXcore_PD12M_ALL_PC_NC_Global
    {

        private ushort xcoreField;

        private string categoria_de_RiesgoField;

        private decimal probabilidad_de_incumplimientoField;

        private DCRXcore_PD12M_ALL_PC_NC_GlobalHorizonteTiempo horizonteTiempoField;

        private DCRXcore_PD12M_ALL_PC_NC_GlobalOdds oddsField;

        private decimal mes_evaluacionField;

        /// <remarks/>
        public ushort Xcore
        {
            get
            {
                return this.xcoreField;
            }
            set
            {
                this.xcoreField = value;
            }
        }

        /// <remarks/>
        public string Categoria_de_Riesgo
        {
            get
            {
                return this.categoria_de_RiesgoField;
            }
            set
            {
                this.categoria_de_RiesgoField = value;
            }
        }

        /// <remarks/>
        public decimal Probabilidad_de_incumplimiento
        {
            get
            {
                return this.probabilidad_de_incumplimientoField;
            }
            set
            {
                this.probabilidad_de_incumplimientoField = value;
            }
        }

        /// <remarks/>
        public DCRXcore_PD12M_ALL_PC_NC_GlobalHorizonteTiempo HorizonteTiempo
        {
            get
            {
                return this.horizonteTiempoField;
            }
            set
            {
                this.horizonteTiempoField = value;
            }
        }

        /// <remarks/>
        public DCRXcore_PD12M_ALL_PC_NC_GlobalOdds Odds
        {
            get
            {
                return this.oddsField;
            }
            set
            {
                this.oddsField = value;
            }
        }

        /// <remarks/>
        public decimal Mes_evaluacion
        {
            get
            {
                return this.mes_evaluacionField;
            }
            set
            {
                this.mes_evaluacionField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRXcore_PD12M_ALL_PC_NC_GlobalHorizonteTiempo
    {

        private decimal desdeField;

        private decimal hastaField;

        /// <remarks/>
        public decimal Desde
        {
            get
            {
                return this.desdeField;
            }
            set
            {
                this.desdeField = value;
            }
        }

        /// <remarks/>
        public decimal Hasta
        {
            get
            {
                return this.hastaField;
            }
            set
            {
                this.hastaField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRXcore_PD12M_ALL_PC_NC_GlobalOdds
    {

        private byte odds_A_FavorField;

        private decimal odds_EnContraField;

        private decimal obligorAzarField;

        private decimal obligorIncumplimientoField;

        private decimal porcientoDeudorIncumplimientoField;

        private decimal porcientoDeudorNoIncumplimientoField;

        private decimal quantilPoblacionField;

        /// <remarks/>
        public byte Odds_A_Favor
        {
            get
            {
                return this.odds_A_FavorField;
            }
            set
            {
                this.odds_A_FavorField = value;
            }
        }

        /// <remarks/>
        public decimal Odds_EnContra
        {
            get
            {
                return this.odds_EnContraField;
            }
            set
            {
                this.odds_EnContraField = value;
            }
        }

        /// <remarks/>
        public decimal ObligorAzar
        {
            get
            {
                return this.obligorAzarField;
            }
            set
            {
                this.obligorAzarField = value;
            }
        }

        /// <remarks/>
        public decimal ObligorIncumplimiento
        {
            get
            {
                return this.obligorIncumplimientoField;
            }
            set
            {
                this.obligorIncumplimientoField = value;
            }
        }

        /// <remarks/>
        public decimal PorcientoDeudorIncumplimiento
        {
            get
            {
                return this.porcientoDeudorIncumplimientoField;
            }
            set
            {
                this.porcientoDeudorIncumplimientoField = value;
            }
        }

        /// <remarks/>
        public decimal PorcientoDeudorNoIncumplimiento
        {
            get
            {
                return this.porcientoDeudorNoIncumplimientoField;
            }
            set
            {
                this.porcientoDeudorNoIncumplimientoField = value;
            }
        }

        /// <remarks/>
        public decimal QuantilPoblacion
        {
            get
            {
                return this.quantilPoblacionField;
            }
            set
            {
                this.quantilPoblacionField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRDeudasPorProducto
    {

        private DCRDeudasPorProductoProducto[] productoField;

        private DCRDeudasPorProductoTotal[] totalField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Producto")]
        public DCRDeudasPorProductoProducto[] Producto
        {
            get
            {
                return this.productoField;
            }
            set
            {
                this.productoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Total")]
        public DCRDeudasPorProductoTotal[] Total
        {
            get
            {
                return this.totalField;
            }
            set
            {
                this.totalField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRDeudasPorProductoProducto
    {

        private string estatusImgField;

        private object estatusImg2Field;

        private byte cantidadCuentasField;

        private DCRDeudasPorProductoProductoCreditoAprobado creditoAprobadoField;

        private string totalAdeudadoField;

        private string cuotaField;

        private object enAtrasoField;

        private object enLegalField;

        private string castigadoField;

        private string nombreField;

        /// <remarks/>
        public string EstatusImg
        {
            get
            {
                return this.estatusImgField;
            }
            set
            {
                this.estatusImgField = value;
            }
        }

        /// <remarks/>
        public object EstatusImg2
        {
            get
            {
                return this.estatusImg2Field;
            }
            set
            {
                this.estatusImg2Field = value;
            }
        }

        /// <remarks/>
        public byte CantidadCuentas
        {
            get
            {
                return this.cantidadCuentasField;
            }
            set
            {
                this.cantidadCuentasField = value;
            }
        }

        /// <remarks/>
        public DCRDeudasPorProductoProductoCreditoAprobado CreditoAprobado
        {
            get
            {
                return this.creditoAprobadoField;
            }
            set
            {
                this.creditoAprobadoField = value;
            }
        }

        /// <remarks/>
        public string TotalAdeudado
        {
            get
            {
                return this.totalAdeudadoField;
            }
            set
            {
                this.totalAdeudadoField = value;
            }
        }

        /// <remarks/>
        public string Cuota
        {
            get
            {
                return this.cuotaField;
            }
            set
            {
                this.cuotaField = value;
            }
        }

        /// <remarks/>
        public object EnAtraso
        {
            get
            {
                return this.enAtrasoField;
            }
            set
            {
                this.enAtrasoField = value;
            }
        }

        /// <remarks/>
        public object EnLegal
        {
            get
            {
                return this.enLegalField;
            }
            set
            {
                this.enLegalField = value;
            }
        }

        /// <remarks/>
        public string Castigado
        {
            get
            {
                return this.castigadoField;
            }
            set
            {
                this.castigadoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Nombre
        {
            get
            {
                return this.nombreField;
            }
            set
            {
                this.nombreField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRDeudasPorProductoProductoCreditoAprobado
    {

        private string monedaField;

        private ushort valueField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Moneda
        {
            get
            {
                return this.monedaField;
            }
            set
            {
                this.monedaField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlTextAttribute()]
        public ushort Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DCRDeudasPorProductoTotal
    {

        private string total_CreditoAprobadoField;

        private string total_AdeudadoField;

        private string total_CuotaField;

        private object total_EnAtrasoField;

        private object total_EnLegalField;

        private string total_CastigadoField;

        private string idField;

        /// <remarks/>
        public string Total_CreditoAprobado
        {
            get
            {
                return this.total_CreditoAprobadoField;
            }
            set
            {
                this.total_CreditoAprobadoField = value;
            }
        }

        /// <remarks/>
        public string Total_Adeudado
        {
            get
            {
                return this.total_AdeudadoField;
            }
            set
            {
                this.total_AdeudadoField = value;
            }
        }

        /// <remarks/>
        public string Total_Cuota
        {
            get
            {
                return this.total_CuotaField;
            }
            set
            {
                this.total_CuotaField = value;
            }
        }

        /// <remarks/>
        public object Total_EnAtraso
        {
            get
            {
                return this.total_EnAtrasoField;
            }
            set
            {
                this.total_EnAtrasoField = value;
            }
        }

        /// <remarks/>
        public object Total_EnLegal
        {
            get
            {
                return this.total_EnLegalField;
            }
            set
            {
                this.total_EnLegalField = value;
            }
        }

        /// <remarks/>
        public string Total_Castigado
        {
            get
            {
                return this.total_CastigadoField;
            }
            set
            {
                this.total_CastigadoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string ID
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class DeudasPorProducto
    {

        private DeudasPorProductoProducto[] productoField;

        private DeudasPorProductoTotal[] totalField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Producto")]
        public DeudasPorProductoProducto[] Producto
        {
            get
            {
                return this.productoField;
            }
            set
            {
                this.productoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Total")]
        public DeudasPorProductoTotal[] Total
        {
            get
            {
                return this.totalField;
            }
            set
            {
                this.totalField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DeudasPorProductoProducto
    {

        private string estatusImgField;

        private object estatusImg2Field;

        private byte cantidadCuentasField;

        private DeudasPorProductoProductoCreditoAprobado creditoAprobadoField;

        private string totalAdeudadoField;

        private string cuotaField;

        private object enAtrasoField;

        private object enLegalField;

        private string castigadoField;

        private string nombreField;

        /// <remarks/>
        public string EstatusImg
        {
            get
            {
                return this.estatusImgField;
            }
            set
            {
                this.estatusImgField = value;
            }
        }

        /// <remarks/>
        public object EstatusImg2
        {
            get
            {
                return this.estatusImg2Field;
            }
            set
            {
                this.estatusImg2Field = value;
            }
        }

        /// <remarks/>
        public byte CantidadCuentas
        {
            get
            {
                return this.cantidadCuentasField;
            }
            set
            {
                this.cantidadCuentasField = value;
            }
        }

        /// <remarks/>
        public DeudasPorProductoProductoCreditoAprobado CreditoAprobado
        {
            get
            {
                return this.creditoAprobadoField;
            }
            set
            {
                this.creditoAprobadoField = value;
            }
        }

        /// <remarks/>
        public string TotalAdeudado
        {
            get
            {
                return this.totalAdeudadoField;
            }
            set
            {
                this.totalAdeudadoField = value;
            }
        }

        /// <remarks/>
        public string Cuota
        {
            get
            {
                return this.cuotaField;
            }
            set
            {
                this.cuotaField = value;
            }
        }

        /// <remarks/>
        public object EnAtraso
        {
            get
            {
                return this.enAtrasoField;
            }
            set
            {
                this.enAtrasoField = value;
            }
        }

        /// <remarks/>
        public object EnLegal
        {
            get
            {
                return this.enLegalField;
            }
            set
            {
                this.enLegalField = value;
            }
        }

        /// <remarks/>
        public string Castigado
        {
            get
            {
                return this.castigadoField;
            }
            set
            {
                this.castigadoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Nombre
        {
            get
            {
                return this.nombreField;
            }
            set
            {
                this.nombreField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DeudasPorProductoProductoCreditoAprobado
    {

        private string monedaField;

        private ushort valueField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Moneda
        {
            get
            {
                return this.monedaField;
            }
            set
            {
                this.monedaField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlTextAttribute()]
        public ushort Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class DeudasPorProductoTotal
    {

        private string total_CreditoAprobadoField;

        private string total_AdeudadoField;

        private string total_CuotaField;

        private object total_EnAtrasoField;

        private object total_EnLegalField;

        private string total_CastigadoField;

        private string idField;

        /// <remarks/>
        public string Total_CreditoAprobado
        {
            get
            {
                return this.total_CreditoAprobadoField;
            }
            set
            {
                this.total_CreditoAprobadoField = value;
            }
        }

        /// <remarks/>
        public string Total_Adeudado
        {
            get
            {
                return this.total_AdeudadoField;
            }
            set
            {
                this.total_AdeudadoField = value;
            }
        }

        /// <remarks/>
        public string Total_Cuota
        {
            get
            {
                return this.total_CuotaField;
            }
            set
            {
                this.total_CuotaField = value;
            }
        }

        /// <remarks/>
        public object Total_EnAtraso
        {
            get
            {
                return this.total_EnAtrasoField;
            }
            set
            {
                this.total_EnAtrasoField = value;
            }
        }

        /// <remarks/>
        public object Total_EnLegal
        {
            get
            {
                return this.total_EnLegalField;
            }
            set
            {
                this.total_EnLegalField = value;
            }
        }

        /// <remarks/>
        public string Total_Castigado
        {
            get
            {
                return this.total_CastigadoField;
            }
            set
            {
                this.total_CastigadoField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string ID
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idField = value;
            }
        }
    }


}
公共类XmlClasses
{
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(“代码”)]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace=”“,IsNullable=false)]
公共部分类DCR
{
私人DCRXcore\u PD1200万台所有PC\u NC\u全球xcore\u PD1200万台所有PC\u NC\u GlobalField;
私人DCRDeudasPorProducto DEUDASPORPRODUCTO油田;
/// 
公共DCRXcore\U PD1200万\U全部\U PC\U NC\U全局Xcore\U PD1200万\U全部\U PC\U NC\U全局
{
得到
{
返回此.xcore\u PD12M\u ALL\u PC\u NC\u GlobalField;
}
设置
{
this.xcore\u PD12M\u ALL\u PC\u NC\u GlobalField=值;
}
}
/// 
公共DCRDeudasPorProducto DEUDASPRODUCTO
{
得到
{
返回此.deudasporoductofield;
}
设置
{
this.deudasporoductofield=值;
}
}
}
/// 
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(“代码”)]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
公共部分类DCRXcore\U PD12M\U所有\U PC\U NC\U全局
{
私人ushort xcoreField;
里斯戈菲尔德私有字符串分类;
私有十进制概率字段;
私有DCRXcore\u PD1200万\u所有PC\u NC\u全球水平视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界视界;
私人DCRXcore\u PD12M\u ALL\u PC\u NC\u GlobalOdds Odsfield;
私有十进制mes_评估场;
/// 
公共体育中心
{
得到
{
返回此.xcoreField;
}
设置
{
this.xcoreField=值;
}
}
/// 
公共字符串分类法
{
得到
{
返回此文件。categoria_de_RiesgoField;
}
设置
{
this.categoria_de_RiesgoField=值;
}
}
/// 
公共小数概率
{
[XmlRoot(ElementName="DeudasPorProducto")]
public class DeudasPorProducto {
    [XmlElement(ElementName="Producto")]
    public List<Producto> Producto { get; set; }
}