Extraer información de un XML CFDI C#
Buenos días camaradas, en este vídeo les mostrare como extraer el UUID y datos del complemento usando la clase cfdv23.cs C#
Espero les sirva
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Xml.Serialization; using System.Xml; XmlSerializer serielizer = new XmlSerializer(typeof(Comprobante)); XmlTextReader reader = new XmlTextReader(@"C:\xml.xml"); Comprobante factura = (Comprobante)serielizer.Deserialize(reader); string strUUID,strSelloSat,strNoCertificadoSat,strSelloCFD,strFechaTimbrado; //MessageBox.Show (factura.fecha.ToString()); strUUID = (factura.Complemento.Any[0].Attributes[3].Value);
Espero les sirva
Comentarios
Publicar un comentario